Problem addition
User coderr25
Submission Time 2024-11-25 15:14:21
Score 0
Max Time N/A
Max Memory N/A

Compile Error

addition.cpp:3:5: error: cannot declare ‘::main’ to be a global variable
3 | int main {
| ^~~~
addition.cpp:4:2: error: expected primary-expression before ‘int’
4 | int a;
| ^~~
addition.cpp:4:2: error: expected ‘}’ before ‘int’
addition.cpp:3:10: note: to match this ‘{’
3 | int main {
| ^
addition.cpp:6:2: error: ‘cin’ does not name a type; did you mean ‘sin’?
6 | cin >> a >> b;
| ^~~
| sin
addition.cpp:8:2: error: ‘sum’ does not name a type
8 | sum = a+b;
| ^~~
addition.cpp:9:1: error: expected declaration before ‘}’ token
9 | }
| ^