Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
121312 郭玉洁 18成绩修改 C++ Compile Error 0 MS 0 KB 261 2025-06-07 11:32:04

Tests(0/0):


Code:

#include<iostream> using namespace std; int main() { int n; cin >> n; int a[n]; for (int i = 0; i <= n; i++) { cin >> a[i]; } int x, b; cin >> x >> b; a[x - 1] = c; for (int i = 0; i <= n; i++) { cout << a[i] << " "; } return 0; }


Run Info:

Main.cc: In function 'int main()':
Main.cc:12:13: error: 'c' was not declared in this scope
  a[x - 1] = c;
             ^