Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
77230 只因你太美(Ikun 真爱粉) [在线测评解答教程] 求和 C++ Compile Error 0 MS 0 KB 227 2024-06-08 16:29:59

Tests(0/0):


Code:

# include<iostream> using namespace std; int main(){ int a,b,m=0,n=0; cin>>a>>b; for(int i=1;i<=b;i++;){ m+=i; } for(int i=1;i<=a;i++;){ n+=i; } cout<<n<<m; return 0; }


Run Info:

Main.cc: In function 'int main()':
Main.cc:7:25: error: expected ')' before ';' token
     for(int i=1;i<=b;i++;){
                         ^
Main.cc:7:26: error: expected primary-expression before ')' token
     for(int i=1;i<=b;i++;){
                          ^
Main.cc:10:25: error: expected ')' before ';' token
     for(int i=1;i<=a;i++;){
                         ^
Main.cc:10:26: error: expected primary-expression before ')' token
     for(int i=1;i<=a;i++;){
                          ^