Problem xmas
User Isabel123
Submission Time 2023-11-10 10:25:54
Score 0
Max Time N/A
Max Memory N/A

Compile Error

xmas.cpp: In function ‘int main()’:
xmas.cpp:6:13: error: expected ‘;’ before ‘int’
6 | cin >> n
| ^
| ;
7 | int arr[n];
| ~~~
xmas.cpp:8:10: error: ‘i’ was not declared in this scope
8 | for (i = 1; i <= n; i++) {
| ^
xmas.cpp:10:20: error: ‘arr’ was not declared in this scope
10 | cin >> arr[0];
| ^~~
xmas.cpp:13:16: error: ‘arr’ was not declared in this scope
13 | cin >> arr[i];
| ^~~
xmas.cpp:15:11: error: ‘arr’ was not declared in this scope
15 | cout << arr [i] << "\n";
| ^~~
xmas.cpp:19:13: error: expected ‘;’ before ‘}’ token
19 | return 0
| ^
| ;
20 | }
| ~