foo.cc: In function 'int main()':
foo.cc:9:17: warning: format '%a' expects argument of type 'float*', but argument 2 has type 'int*' [-Wformat=]
9 | scanf("%a",&a);
| ~^ ~~
| | |
| | int*
| float*
| %d
foo.cc:5:17: warning: variable 'd' set but not used [-Wunused-but-set-variable]
5 | int a,b,d;
| ^
foo.cc: At global scope:
foo.cc:42:15: error: expected constructor, destructor, or type conversion before '(' token
42 | printf("%.2f",d);
| ^
foo.cc:43:9: error: expected unqualified-id before 'return'
43 | return 0;
| ^~~~~~
foo.cc:44:1: error: expected declaration before '}' token
44 | }
| ^
[Hydro](https://hydro.ac)提供评测服务