Compile Error

/in/foo.cc: In function 'int main()':
/in/foo.cc:7:27: error: expression list treated as compound expression in functional cast [-fpermissive]
  float(%f,%f,%c,"%a,%b,%c");
                           ^
/in/foo.cc:7:2: error: expected primary-expression before 'float'
  float(%f,%f,%c,"%a,%b,%c");
  ^~~~~
/in/foo.cc:8:7: error: 'a' was not declared in this scope
  cin>>a>>b>>op
       ^
/in/foo.cc:8:10: error: 'b' was not declared in this scope
  cin>>a>>b>>op
          ^
/in/foo.cc:8:13: error: 'op' was not declared in this scope
  cin>>a>>b>>op
             ^~
/in/foo.cc:13:2: error: 'else' without a previous 'if'
  else if(op=='-')
  ^~~~
/in/foo.cc:15:3: error: 'c' was not declared in this scope
   c=a-b;
   ^
/in/foo.cc:19:3: error: 'c' was not declared in this scope
   c=a/b;
   ^
/in/foo.cc:23:3: error: 'c' was not declared in this scope
   c=a*b;
   ^
/in/foo.cc:25:8: error: 'sum' was not declared in this scope
  cout<<sum;
        ^~~
/in/foo.cc:26:16: error: 'c' was not declared in this scope
  printf("%.2f",c);
                ^

信息

递交者
类型
递交
题目
P1028 简单计算器
语言
C++
递交时间
2021-12-05 10:32:07
评测时间
2021-12-05 10:32:07
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes