#include <iostream>
using namespace std;
int main()
{
char cChioce;
do
{
cout<<"* 1. 吃饭"<<endl;
cout<<"* 2. 睡觉"<<endl;
cout<<"* 3. 打豆豆"<<endl;
cout<<"* 0. 退出"<<endl;
cout<<"* 请选择(0-3):";
cin>>cChioce;
if (cChioce=='1')
cout<<"我吃吃吃... ..."<<endl;
else if (cChioce=='2')
cout<<"我睡觉觉... ..."<<endl;
else if (cChioce=='3')
cout<<"我打打打... ..."<<endl;
else if (cChioce=='0')
break;
else
{
cout<<"\007选择错误!"<<endl<<endl;
continue;
}
cout<<"恭喜你完成了一项工作!"<<endl<<endl;
}while(1);
return 0;
}
练习,打豆豆
最新推荐文章于 2021-05-20 10:14:17 发布