Problem evenorodd
User Fish
Submission Time 2024-07-22 14:37:57
Score 0
Max Time N/A
Max Memory N/A

Compile Error

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 number;
| ^~~
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
6 | cin >> number;
| ^~~
evenorodd.cpp:7:2: error: expected unqualified-id before ‘if’
7 | if (number % 2 == 0) {
| ^~
evenorodd.cpp:10:2: error: expected unqualified-id before ‘else’
10 | else if (number % 2 != 0) {
| ^~~~
evenorodd.cpp:14:2: error: expected unqualified-id before ‘return’
14 | return 0;
| ^~~~~~
evenorodd.cpp:15:1: error: expected declaration before ‘}’ token
15 | }
| ^