Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
120548 李亭绪 输出成绩等级II C++ Compile Error 0 MS 0 KB 503 2025-05-29 20:44:59

Tests(0/0):


Code:

/ cin\cout\endl #include<cstdio> //scanf()\printf() #include<cstring> // strcpy()\strcat()\strcmp()\strlen()\memset() #include<cmath> //sqrt()\pow()\abs()\ceil()\floor()\max()\min() using namespace std; int main(){ int a,b; cin>>a; a=a/10; switch(a) { case 10:cout<<"A";break; case 9:cout<<"A";break; case 8:cout<<"B";break; case 7:cout<<"B";break; case 6:cout<<"C";break; default:cout<<"B";break; } }


Run Info:

Main.cc:1:1: error: stray '\' in program
 / cin\cout\endl
 ^
Main.cc:1:1: error: stray '\' in program
Main.cc:1:1: error: expected unqualified-id before '/' token
In file included from /usr/include/c++/5/cmath:43:0,
                 from Main.cc:5:
/usr/include/c++/5/ext/type_traits.h:160:35: error: '__gnu_cxx::__is_null_pointer' declared as an 'inline' variable
   __is_null_pointer(std::nullptr_t)
                                   ^
/usr/include/c++/5/ext/type_traits.h:160:35: error: 'bool __gnu_cxx::__is_null_pointer' redeclared as different kind of symbol
/usr/include/c++/5/ext/type_traits.h:155:5: note: previous declaration 'template bool __gnu_cxx::__is_null_pointer(_Type)'
     __is_null_pointer(_Type)
     ^
/usr/include/c++/5/ext/type_traits.h:160:21: error: 'nullptr_t' is not a member of 'std'
   __is_null_pointer(std::nullptr_t)
                     ^
Main.cc: In function 'int main()':
Main.cc:9:5: error: 'cin' was not declared in this scope
     cin>>a;
     ^
Main.cc:13:18: error: 'cout' was not declared in this scope
          case 10:cout<<"A";break;
                  ^
Main.cc:8:11: warning: unused variable 'b' [-Wunused-variable]
     int a,b;
           ^