Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
129836 袁昊贝 [在线测评解答教程] 求和 C++ Compile Error 0 MS 0 KB 181 2025-09-06 16:53:10

Tests(0/0):


Code:

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


Run Info:

Main.cc:1:2: error: invalid preprocessing directive #inclde
 #inclde 
  ^
Main.cc: In function 'int main()':
Main.cc:6:5: error: 'cin' was not declared in this scope
     cin>>n;
     ^
Main.cc:11:5: error: expected ';' before '}' token
     }
     ^
Main.cc:12:5: error: 'cout' was not declared in this scope
     cout<