foo.cc: In function 'int main()':
foo.cc:7:24: warning: format '%c' expects argument of type 'char*', but argument 4 has type 'float*' [-Wformat=]
7 | scanf("*%f,%f,%c",&n1,&n2,&r);
| ~^ ~~
| | |
| char* float*
| %e
foo.cc:8:9: error: case label ''+'' not within a switch statement
8 | case'+';
| ^~~~
foo.cc:8:16: error: expected ':' before ';' token
8 | case'+';
| ^
| :
foo.cc:10:9: error: case label ''-'' not within a switch statement
10 | case'-';
| ^~~~
foo.cc:10:16: error: expected ':' before ';' token
10 | case'-';
| ^
| :
foo.cc:12:5: error: case label ''*'' not within a switch statement
12 | case'*';
| ^~~~
foo.cc:12:12: error: expected ':' before ';' token
12 | case'*';
| ^
| :
foo.cc:14:5: error: case label ''/'' not within a switch statement
14 | case'/';
| ^~~~
foo.cc:14:12: error: expected ':' before ';' token
14 | case'/';
| ^
| :
foo.cc:16:8: error: break statement not within loop or switch
16 | break;
| ^~~~~
foo.cc:6:14: warning: unused variable 'op' [-Wunused-variable]
6 | char op;
| ^~
foo.cc: At global scope:
foo.cc:18:7: error: expected constructor, destructor, or type conversion before '(' token
18 | printf("&,2f",r);
| ^
foo.cc:19:1: error: expected unqualified-id before 'return'
19 | return 0;
| ^~~~~~
[Hydro](https://hydro.ac)提供评测服务