Problem sumint
User StormyGood
Submission Time 2024-01-12 15:05:32
Score 0
Max Time N/A
Max Memory N/A

Compile Error

sumint.cpp:3:13: error: expected initializer before ‘long’
3 | #define int long long
| ^~~~
sumint.cpp:5:2: note: in expansion of macro ‘int’
5 | int a,b,sum=0;
| ^~~
sumint.cpp:6:2: error: ‘cin’ does not name a type
6 | cin >> a;
| ^~~
sumint.cpp:7:2: error: expected unqualified-id before ‘for’
7 | for (int i = 1; i <= a; i++)
| ^~~
sumint.cpp:7:18: error: ‘i’ does not name a type
7 | for (int i = 1; i <= a; i++)
| ^
sumint.cpp:7:26: error: ‘i’ does not name a type
7 | for (int i = 1; i <= a; i++)
| ^
sumint.cpp:12:2: error: ‘cout’ does not name a type
12 | cout << sum;
| ^~~~
sumint.cpp:13:1: error: expected declaration before ‘}’ token
13 | }
| ^