Compile Error

foo.cc: In function 'int main()':
foo.cc:8:9: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    8 |         cin >> a >> b >> c;
      |         ^~~
      |         std::cin
iostream:60:18: note: 'std::cin' declared here
foo.cc:10:9: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   10 |         cout << fixed << setprecision(1) << prv << endl;
      |         ^~~~
      |         std::cout
iostream:61:18: note: 'std::cout' declared here
foo.cc:10:17: error: 'fixed' was not declared in this scope; did you mean 'std::fixed'?
   10 |         cout << fixed << setprecision(1) << prv << endl;
      |                 ^~~~~
      |                 std::fixed
In file included from /nix/store/jdc41bl531bw84wi82y6gvij34q5m24a-gcc-11.3.0/include/c++/11.3.0/ios:42,
                 from /nix/store/jdc41bl531bw84wi82y6gvij34q5m24a-gcc-11.3.0/include/c++/11.3.0/ostream:38,
                 from iostream:39:
/nix/store/jdc41bl531bw84wi82y6gvij34q5m24a-gcc-11.3.0/include/c++/11.3.0/bits/ios_base.h:1071:3: note: 'std::fixed' declared here
 1071 |   fixed(ios_base& __base)
      |   ^~~~~
foo.cc:10:26: error: 'setprecision' was not declared in this scope; did you mean 'std::setprecision'?
   10 |         cout << fixed << setprecision(1) << prv << endl;
      |                          ^~~~~~~~~~~~
      |                          std::setprecision
In file included from foo.cc:2:
/nix/store/mw4d4anr365inzb4a37fd4dmd3fjg51g-gcc/include/c++/11.3.0/iomanip:195:3: note: 'std::setprecision' declared here
  195 |   setprecision(int __n)
      |   ^~~~~~~~~~~~
foo.cc:10:52: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
   10 |         cout << fixed << setprecision(1) << prv << endl;
      |                                                    ^~~~
      |                                                    std::endl
In file included from iostream:39:
/nix/store/jdc41bl531bw84wi82y6gvij34q5m24a-gcc-11.3.0/include/c++/11.3.0/ostream:684:5: note: 'std::endl' declared here
  684 |     endl(basic_ostream<_CharT, _Traits>& __os)
      |     ^~~~
[Hydro](https://hydro.ac)提供评测服务

信息

递交者
类型
自测
题目
P1011 求平均值
语言
C++
递交时间
2022-08-31 16:05:50
评测时间
2022-08-31 16:05:50
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes