本帖最後由 曹祁望 於 2022-11-18 20:04 編輯
- #include<iostream>
- #include<cstdlib>
- using namespace std;
- int main()
- {
- int ans;
- string sch;
- int h;
- int w;
- string name;
-
- cout<<"為了證明你是真人,請回答這個問題"<<endl;
- cout<<"8的3次根號="<<endl;
- cin>>ans;
- if(ans==2)
- {
- cout<<"你是人"<<endl;
-
- cout<<"學校:"<<endl;
- cin>>sch;
- cout<<"名字:"<<endl;
- cin>>name;
- cout<<"身高(cm):"<<endl;
- cin>>h;
- cout<<"體重(kg):"<<endl<<endl;
- cin>>w;
- cout<<"你的名字:"<<name<<endl;
- cout<<"你的學校:"<<sch<<endl;
- cout<<"你的身高(cm):"<<endl;
- cout<<"你的體重(kg):"<<endl<<endl;
-
- if(h<130)
- {
- cout<<"你是矮子"<<endl;
- }
- if(w>90)
- {
- cout<<"你很胖"<<endl;
- }
- }
- else
- {
- cout<<"數學不行阿"<<endl;
- }
-
- system("pause");
- return 0;
- }
複製代碼 |