33,311
社区成员
发帖
与我相关
我的任务
分享
#include <cstdlib>
#include <iostream>
using namespace std;
int main(int argc, char *argv[])
{
int x;
do
{
cout << "輸入你要進行的操作:" <<endl;
cin>> x;
}
while (x> 1 && x< 4 );
cout <<x;
system("PAUSE");
return EXIT_SUCCESS;
}
#include <cstdlib>
#include <iostream>
using namespace std;
int main(int argc, char *argv[])
{
string x;
do
{
cout << "輸入你要進行的操作:" <<endl;
cin>> x;
}
while (x== "1" || x=="4");
cout <<x;
system("PAUSE");
return EXIT_SUCCESS;
}