Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
95267 王子毅 03圆的面积 C++ Compile Error 0 MS 0 KB 225 2024-10-27 10:40:32

Tests(0/0):


Code:

#include<iostream> using namespace() std; int main() { cout>>1*3.1415926>>endl; cout>>3*3.1415926>>endl; cout>>5*3.1415926>>endl; cout>>7*3.1415926>>endl; cout>>9*3.1415926>>endl; return 0; }


Run Info:

Main.cc:2:16: error: expected identifier before '(' token
 using namespace() std;
                ^
Main.cc:2:16: error: expected ';' before '(' token
Main.cc:2:17: error: expected unqualified-id before ')' token
 using namespace() std;
                 ^
Main.cc: In function 'int main()':
Main.cc:5:5: error: 'cout' was not declared in this scope
     cout>>1*3.1415926>>endl;
     ^
Main.cc:5:5: note: suggested alternative:
In file included from Main.cc:1:0:
/usr/include/c++/5/iostream:61:18: note:   'std::cout'
   extern ostream cout;  /// Linked to standard output
                  ^
Main.cc:5:24: error: 'endl' was not declared in this scope
     cout>>1*3.1415926>>endl;
                        ^
Main.cc:5:24: note: suggested alternative:
In file included from /usr/include/c++/5/iostream:39:0,
                 from Main.cc:1:
/usr/include/c++/5/ostream:590:5: note:   'std::endl'
     endl(basic_ostream<_CharT, _Traits>& __os)
     ^