Problem sumint
User Zhuoxun
Submission Time 2024-03-01 14:44:07
Score 0
Max Time N/A
Max Memory N/A

Compile Error

sumint.cpp: In function ‘int32_t main()’:
sumint.cpp:3:13: error: ‘longlong’ was not declared in this scope
3 | #define int longlong
| ^~~~~~~~
sumint.cpp:6:2: note: in expansion of macro ‘int’
6 | int n, curr;
| ^~~
sumint.cpp:7:6: error: expected ‘;’ before ‘sum’
7 | int sum = 0;
| ^~~
sumint.cpp:8:9: error: ‘n’ was not declared in this scope; did you mean ‘yn’?
8 | cin >> n;
| ^
| yn
sumint.cpp:9:11: error: expected ‘;’ before ‘i’
9 | for (int i = 0; i < n; i++) {
| ^
sumint.cpp:9:18: error: ‘i’ was not declared in this scope
9 | for (int i = 0; i < n; i++) {
| ^
sumint.cpp:10:10: error: ‘curr’ was not declared in this scope
10 | cin >> curr;
| ^~~~
sumint.cpp:11:3: error: ‘sum’ was not declared in this scope
11 | sum += curr;
|