#include using namespace std; int main(){ int i=1; switch(i){ case 1://数字不用加引号,char单引号,字符串双引号 cout << 1 << endl; break; case '2': cout << 2 << endl; break; } return 0; }