Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
93560 陈铎文 A+B 输入输出练习IV C++ Compile Error 0 MS 0 KB 489 2024-10-18 13:04:05

Tests(0/0):


Code:

#include<iostream> // cin\cout\endl #include<cstdio> //scanf()\printf() #include<cstring> // strcpy()\strcat()\strcmp()\strlen()\memset() #include<cmath> //sqrt()\pow()\abs()\ceil()\floor()\max()\min() using namespace std; int main(){ int a[101]={} int m,s=0; while(m){ cin>>m; for(int i=1;i<=m;i++){ cin>>a[i]; } for(int i=1;i<=m;i++){ s+=a[i]; } cout<<s; } return 0; }


Run Info:

Main.cc: In function 'int main()':
Main.cc:9:5: error: expected ',' or ';' before 'int'
     int m,s=0;
     ^
Main.cc:10:11: error: 'm' was not declared in this scope
     while(m){
           ^
Main.cc:16:11: error: 's' was not declared in this scope
           s+=a[i];
           ^
Main.cc:18:14: error: 's' was not declared in this scope
        cout<