You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
18 lines
240 B
18 lines
240 B
2 years ago
|
#include <iostream>
|
||
|
|
||
|
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;
|
||
|
}
|