Problem | exam |
---|---|
User | alettuce |
Submission Time | 2024-02-23 13:41:58 |
Score | 0 |
Max Time | N/A |
Max Memory | N/A |
Owl Get a Life
exam.cpp:4:5: error: cannot declare ‘::main’ to be a global variable
4 | int main {
| ^~~~
exam.cpp:5:2: error: expected primary-expression before ‘int’
5 | int x;
| ^~~
exam.cpp:5:2: error: expected ‘}’ before ‘int’
exam.cpp:4:10: note: to match this ‘{’
4 | int main {
| ^
exam.cpp:6:2: error: ‘cin’ does not name a type
6 | cin >> x;
| ^~~
exam.cpp:7:2: error: expected unqualified-id before ‘if’
7 | if x == 1 {
| ^~
exam.cpp:9:4: error: expected unqualified-id before ‘else’
9 | } else {
| ^~~~
exam.cpp:18:2: error: expected unqualified-id before ‘return’
18 | return 0
| ^~~~~~
exam.cpp:19:1: error: expected declaration before ‘}’ token
19 | }
| ^