Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
2448 莫业祁 [在线测评解答教程] A+B Problem C++ Compile Error 0 MS 0 KB 107 2024-01-06 15:59:09

Tests(0/0):


Code:

# include<iostream> using namespace std; int main{ int a,b; cin>>a>>b; cout<<a+b<<endl; }


Run Info:

Main.cc:4:5: error: expected primary-expression before 'int'
     int a,b;
     ^
Main.cc:4:5: error: expected '}' before 'int'
Main.cc:4:5: error: expected ',' or ';' before 'int'
Main.cc:5:5: error: 'cin' does not name a type
     cin>>a>>b;
     ^
Main.cc:6:5: error: 'cout' does not name a type
     cout<a+b<<endl;
     ^
Main.cc:7:1: error: expected declaration before '}' token
 }
 ^