- #include <iostream>
- using namespace std;
- int main()
- {
- int options;
- cout<<"select your desired baverage(1.Coffee 2.Milk 3.Tea): ";
- cin>>options;
-
- switch(options){
- case 1:
- cout<<"Coffee"<<endl;
- break;
- case 2:
- cout<<"Milk"<<endl;
- break;
- case 3:
- cout<<"Tea"<<endl;
- break;
- default:
- cout<<"oops, information out of reach...";
- }
- system ("pause");
- return 0;
- }
複製代碼 |