- #include<iostream>
- #include<cstdlib>
- using namespace std;
- int main()
- {
- int x,y,a,b;
- cout<<"請輸入收縮壓:";
- cin>>x;
- cout<<"請輸入舒張壓:";
- cin>>y;
- if(x <120 && y <80 )
- {
- cout<<"正常"<<endl;
- }
- else
- {
- cout<<"有問題,建議詢問醫生"<<endl;
- }
- if(true)
- {
- cout<<"......?...好像不正常?"<<endl;
- }
- else
- {
- cout<<"你很健康。"<<endl;
- }
- if(!true)
- {
- cout<<"等等!你病了!"<<endl;
- }
- else
- {
- cout<<"不對,你沒什麼問題"<<endl;
- }if(false)
- {
- cout<<"不對,你沒什麼問題"<<endl;
- }
- else
- {
- cout<<"你病了。"<<endl;
- }
-
- system("pause");
- return 0;
- }
複製代碼 |