Problem | evenorodd |
---|---|
User | Abi |
Submission Time | 2024-07-19 15:43:35 |
Score | 0 |
Max Time | N/A |
Max Memory | N/A |
Owl Get a Life
evenorodd.cpp:4:5: error: cannot declare ‘::main’ to be a global variable
4 | int main{
| ^~~~
evenorodd.cpp:5:2: error: expected primary-expression before ‘int’
5 | int x;
| ^~~
evenorodd.cpp:5:2: error: expected ‘}’ before ‘int’
evenorodd.cpp:4:9: note: to match this ‘{’
4 | int main{
| ^
evenorodd.cpp:6:2: error: ‘cin’ does not name a type; did you mean ‘sin’?
6 | cin >> int x;
| ^~~
| sin
evenorodd.cpp:7:2: error: expected unqualified-id before ‘if’
7 | if ( x % 2 == 0) {
| ^~
evenorodd.cpp:10:2: error: expected unqualified-id before ‘else’
10 | else{
| ^~~~
evenorodd.cpp:13:1: error: expected declaration before ‘}’ token
13 | }
| ^