- #include<iostream>
- #include<cstdlib>
- using namespace std;
- int main()
- {
- char ans;
- re:
- cout<<"<測試你數學有沒有學好的問題>"<<endl;
- cout<<"45x+44y=90,44x+45y=88,x和y都是正整數,求x和y(A)x=2,y=0(B)x=1,y=1(C)x=0,y=2(D)無解"<<endl;
- cin>>ans;
- switch(ans)
- {
- case 'A':
- case 'a ':
- cout<<"沒在看題目嗎?";
- break;
- case 'c':
- case 'C':
- cout<<"沒在看題目嗎?";
- break;
- case 'B':
- case 'b':
- cout<<"重算!";
- break;
- case 'D':
- case 'd':
- cout<<"很厲害嗎!";
- break;
- default:
- cout<<"請勿亂輸入!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!";
- }
- system("pause");
- return 0;
- }
複製代碼 |