Problem addition
User justin271828
Submission Time 2023-05-29 16:31:11
Score 0
Max Time N/A
Max Memory N/A

Compile Error

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