foo.cc: In function 'int main()':
foo.cc:8:11: error: expected ':' before 'case'
8 | case 100
| ^
| :
9 | case 90
| ~~~~
foo.cc:9:10: error: expected ':' before 'cout'
9 | case 90
| ^
| :
10 | cout<<"A";
| ~~~~
foo.cc:11:4: error: break statement not within loop or switch
11 | break;
| ^~~~~
foo.cc:12:3: error: case label '89' not within a switch statement
12 | case 89
| ^~~~
foo.cc:12:10: error: expected ':' before 'case'
12 | case 89
| ^
| :
13 | case 80
| ~~~~
foo.cc:13:3: error: case label '80' not within a switch statement
13 | case 80
| ^~~~
foo.cc:13:10: error: expected ':' before 'cout'
13 | case 80
| ^
| :
14 | cout<<"B";
| ~~~~
foo.cc:15:4: error: break statement not within loop or switch
15 | break;
| ^~~~~
foo.cc:16:3: error: case label '79' not within a switch statement
16 | case 79
| ^~~~
foo.cc:16:10: error: expected ':' before 'case'
16 | case 79
| ^
| :
17 | case 70
| ~~~~
foo.cc:17:3: error: case label '70' not within a switch statement
17 | case 70
| ^~~~
foo.cc:17:10: error: expected ':' before 'cout'
17 | case 70
| ^
| :
18 | cout<<"C";
| ~~~~
foo.cc:19:4: error: break statement not within loop or switch
19 | break;
| ^~~~~
foo.cc:20:3: error: case label '69' not within a switch statement
20 | case 69
| ^~~~
foo.cc:20:10: error: expected ':' before 'case'
20 | case 69
| ^
| :
21 | case 60
| ~~~~
foo.cc:21:3: error: case label '60' not within a switch statement
21 | case 60
| ^~~~
foo.cc:21:10: error: expected ':' before 'cout'
21 | case 60
| ^
| :
22 | cout<<"D";
| ~~~~
foo.cc:23:4: error: break statement not within loop or switch
23 | break;
| ^~~~~
foo.cc:24:3: error: case label not within a switch statement
24 | default:
| ^~~~~~~
[Hydro](https://hydro.ac)提供评测服务