Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
139924 孔声豪 09闰年第n个月有多少天 C++ Compile Error 0 MS 0 KB 314 2025-12-13 10:48:17

Tests(0/0):


Code:

#include<iostream> using namespeak std; int main() { int a; cin>>a; if(a<=12&&a>=1){ cout<<lnvalid<<endl; } else if(a==1||a==3||a==5||a==7||a==8||a==10||a==12){ cout<<31<<endl; } else if(a=2) { cout<<29<<endl; } else{ cout<<30<<endl; } return 0; }


Run Info:

Main.cc:2:7: error: expected nested-name-specifier before 'namespeak'
 using namespeak std;
       ^
Main.cc: In function 'int main()':
Main.cc:6:3: error: 'cin' was not declared in this scope
   cin>>a;
   ^
Main.cc:6:3: note: suggested alternative:
In file included from Main.cc:1:0:
/usr/include/c++/5/iostream:60:18: note:   'std::cin'
   extern istream cin;  /// Linked to standard input
                  ^
Main.cc:8:6: error: 'cout' was not declared in this scope
      cout<& __os)
     ^
Main.cc:11:4: error: 'cout' was not declared in this scope
    cout<<31<& __os)
     ^
Main.cc:13:15: warning: suggest parentheses around assignment used as truth value [-Wparentheses]
    else if(a=2) {
               ^
Main.cc:14:5: error: 'cout' was not declared in this scope
     cout<<29<& __os)
     ^
Main.cc:17:5: error: 'cout' was not declared in this scope
     cout<<30<& __os)
     ^