Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
149679 张咏灏 [在线测评解答教程] 求和 C++ Compile Error 0 MS 0 KB 163 2026-03-15 18:38:24

Tests(0/0):


Code:

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


Run Info:

Main.cc: In function 'int main()':
Main.cc:5:5: error: expected ',' or ';' before 'cin'
     cin>>a;
     ^