#include <iostream>
using namespace std;
int main()
{
int x;
cout << "enter a number:\n";
cin >> x;
switch (x) {
case 1:
case 2:
case 3:
cout << "x is 1, 2 or 3."<<endl;
break;
default:
cout << "x is not 1, 2, or 3!"<<endl;
}
return 0;
}
c++基础(7)
最新推荐文章于 2023-08-15 11:56:51 发布