Compile Error

foo.cc: In function 'int main()':
foo.cc:12:9: error: 'cost' was not declared in this scope; did you mean 'const'?
   12 |         cost = 10.0 + (d - 3.0) * 2.5;
      |         ^~~~
      |         const
foo.cc:14:9: error: 'cost' was not declared in this scope; did you mean 'const'?
   14 |         cost = 10.0 + 7.0 * 2.5 + (d - 10.0) * 3.75;
      |         ^~~~
      |         const
foo.cc:18:13: error: 'setprecision' was not declared in this scope
   18 |     cout << setprecision(2);
      |             ^~~~~~~~~~~~
foo.cc:19:13: error: 'cost' was not declared in this scope; did you mean 'const'?
   19 |     cout << cost << endl;
      |             ^~~~
      |             const
正在同步测试数据,请稍后
[Hydro](https://hydro.ac)提供评测服务

信息

递交者
类型
递交
题目
P1027 出租车计价
语言
C++
递交时间
2023-09-25 20:35:10
评测时间
2023-09-25 20:35:10
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes