Problem addition
User xintz
Submission Time 2025-08-01 13:37:01
Score 0
Max Time N/A
Max Memory N/A

Compile Error

addition.cpp:2:5: error: cannot declare ‘::main’ to be a global variable
2 | int main{
| ^~~~
addition.cpp:3:2: error: expected primary-expression before ‘int’
3 | int a, b;
| ^~~
addition.cpp:3:2: error: expected ‘}’ before ‘int’
addition.cpp:2:9: note: to match this ‘{’
2 | int main{
| ^
addition.cpp:4:2: error: ‘cin’ does not name a type
4 | cin >> a >> b;
| ^~~
addition.cpp:5:2: error: ‘cout’ does not name a type
5 | cout << a+b;
| ^~~~
addition.cpp:7:1: error: expected declaration before ‘}’ token
7 | }
| ^