Compile Error

foo.cc:1:30: error: expected constructor, destructor, or type conversion before '(' token
 int x,y,z; float price; scanf("%d,%d,%d",&x,&y,&z); price = 99*x+y*99*0.5+z*99*0.55; printf("%.2f ",price);
                              ^
foo.cc:1:53: error: 'price' does not name a type
 int x,y,z; float price; scanf("%d,%d,%d",&x,&y,&z); price = 99*x+y*99*0.5+z*99*0.55; printf("%.2f ",price);
                                                     ^~~~~
foo.cc:1:92: error: expected constructor, destructor, or type conversion before '(' token
 int x,y,z; float price; scanf("%d,%d,%d",&x,&y,&z); price = 99*x+y*99*0.5+z*99*0.55; printf("%.2f ",price);
                                                                                            ^
[Hydro](https://hydro.ac)提供评测服务

信息

递交者
类型
递交
题目
P1010 门票总价
语言
C++
递交时间
2021-11-19 18:28:40
评测时间
2021-11-19 18:28:40
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes