- #include<iostream>
- #include<cstdlib>
- using namespace std;
- int main()
- {
- char ans;
- re:
- cout<<"Brainless Question"<<endl;
- cout<<"1+1=? "<<endl;
- cout<<"Answer (a) 1 (b) 2 (c) 3 (d) 6 "<<endl;
- cin>>ans;
- switch (ans)
- {
- case 'a':
- cout<<"wrong!"<<endl;
- break;
- case 'b':
- cout<<"Correct!"<<endl;
- break;
- case 'c':
- cout<<"wrong!"<<endl;
- break;
- case 'd':
- cout<<"wrong!"<<endl;
- break;
- default:
- cout<<"Eeror"<<endl;
- }
- goto re;
- system("pause");
- return 0;
- }
複製代碼 |