Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
5807 吴承熹 13求1+2-3+4-5+……n的值 C++ Compile Error 0 MS 0 KB 178 2024-12-15 12:24:39

Tests(0/0):


Code:

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


Run Info:

Main.cc: In function 'int main()':
Main.cc:8:5: error: expected ';' before '}' token
     }
     ^