Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
6955 谢锦卓 18删除成绩 C++ Compile Error 0 MS 0 KB 491 2025-03-29 10:12:01

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 a[101],n,tot; int main(){ cin>>n; for(int i=1;i<=n;i++){ cin>>a[i]; } cin>>tot; for(int i=n;i>=1;i++) a[i+1]=a[i]; a[i]=tot; for(int i=1;i<=n;i++) cout<<a[i]<<endl; return 0; }


Run Info:

Main.cc: In function 'int main()':
Main.cc:16:7: error: 'i' was not declared in this scope
     a[i]=tot;   
       ^