Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
99647 黄思翔 参赛组别推荐 C++ Compile Error 0 MS 0 KB 280 2024-11-30 12:20:58

Tests(0/0):


Code:

using namespace std; int main(){ int n; cin>>n; if(n<8){ cout<<"You are too young!"; } if(n>=8&&n<=12){ cout<<"Welcome to Junior Class!"; } if(n>=13&&n<=18){ cout<<"Welcome to Senior Class!"; } if(n>19){ cout<<"You are too old!"; } return 0; }


Run Info:

Main.cc: In function 'int main()':
Main.cc:4:2: error: 'cin' was not declared in this scope
  cin>>n;
  ^
Main.cc:6:3: error: 'cout' was not declared in this scope
   cout<<"You are too young!";
   ^
Main.cc:9:3: error: 'cout' was not declared in this scope
   cout<<"Welcome to Junior Class!";
   ^
Main.cc:12:3: error: 'cout' was not declared in this scope
   cout<<"Welcome to Senior Class!"; 
   ^
Main.cc:15:3: error: 'cout' was not declared in this scope
   cout<<"You are too old!";
   ^