Compile Error

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)提供评测服务

信息

递交者
类型
递交
题目
P1028 简单计算器
语言
C++
递交时间
2023-12-14 20:53:59
评测时间
2023-12-14 20:53:59
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes