Compile Error

foo.cc:17:5: error: cannot declare '::main' to be a global variable
 int main
     ^~~~
foo.cc:19:2: error: expected primary-expression before 'int'
  int n;
  ^~~
foo.cc:19:2: error: expected '}' before 'int'
foo.cc:20:2: error: 'cin' does not name a type; did you mean 'main'?
  cin>>n;
  ^~~
  main
foo.cc:21:2: error: 'cout' does not name a type
  cout<<f(n);
  ^~~~
foo.cc:23:2: error: expected unqualified-id before 'return'
  return 0;
  ^~~~~~
foo.cc:24:1: error: expected declaration before '}' token
 }
 ^
[Hydro](https://hydro.ac)提供评测服务

信息

递交者
类型
递交
题目
P1093 阶段测验3(5)
语言
C++
递交时间
2021-07-28 20:24:50
评测时间
2021-07-28 20:24:50
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes