Compile Error

foo.cc: In function 'int main()':
foo.cc:7:1: error: 'charg' was not declared in this scope; did you mean 'char'?
    7 | charg;
      | ^~~~~
      | char
foo.cc:10:6: error: 'g' was not declared in this scope
   10 | cin>>g;
      |      ^
foo.cc:13:8: error: expected ':' before ';' token
   13 | case'+'; printf("%.2f",a+b); break;
      |        ^
      |        :
foo.cc:14:8: error: expected ':' before ';' token
   14 | case'-'; printf("%.2f",a-b); break;
      |        ^
      |        :
foo.cc:15:8: error: expected ':' before ';' token
   15 | case'*'; printf("%.2f",a*b);break;
      |        ^
      |        :
[Hydro](https://hydro.ac)提供评测服务

信息

递交者
类型
递交
题目
P1029 简单计算器
语言
C++
递交时间
2022-07-09 21:14:01
评测时间
2022-07-09 21:14:01
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes