| Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
|---|---|---|---|---|---|---|---|---|
| 144005 | 张晓冉 | A+B 输入输出练习IV | C++ | Compile Error | 0 MS | 0 KB | 299 | 2026-01-18 11:00:45 |
#include<iostream> using namespace std; int main() { int N; while(cin>>N){ if(N = 0){ break; } int num <<endl; for(int i = 0;i < N;i++){ cin>>num; sum += num; } cout<<sum<<endl; } return 0; }
Main.cc: In function 'int main()':
Main.cc:7:14: warning: suggest parentheses around assignment used as truth value [-Wparentheses]
if(N = 0){
^
Main.cc:10:17: error: expected initializer before '<<' token
int num <>num;
^
Main.cc:13:13: error: 'sum' was not declared in this scope
sum += num;
^
Main.cc:15:15: error: 'sum' was not declared in this scope
cout<