Problem sumint
User AdwinLau
Submission Time 2024-11-26 12:29:24
Score 0
Max Time N/A
Max Memory N/A

Compile Error

sumint.cpp: In function ‘int main()’:
sumint.cpp:17:3: error: expected ‘,’ or ‘;’ before ‘cin’
17 | cin >> d;
| ^~~
sumint.cpp:18:3: error: ‘For’ was not declared in this scope
18 | For i < d:
| ^~~
sumint.cpp:20:9: error: invalid conversion from ‘char*’ to ‘long long int’ [-fpermissive]
20 | s= s + input
| ~~^~~~~~~
| |
| char*
sumint.cpp:20:16: error: expected ‘;’ before ‘i’
20 | s= s + input
| ^
| ;
21 | i = i+1
| ~
sumint.cpp: At global scope:
sumint.cpp:25:3: error: expected unqualified-id before ‘return’
25 | return 0;
| ^~~~~~
sumint.cpp:27:3: error: ‘cout’ does not name a type
27 | cout << s;
| ^~~~
sumint.cpp:29:1: error: expected declaration before ‘}’ token
29 | }
| ^