Problem evenorodd
User irinatan
Submission Time 2024-02-21 11:04:01
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 numb;
| ^~~
evenorodd.cpp:5:2: error: expected ‘}’ before ‘int’
evenorodd.cpp:4:10: note: to match this ‘{’
4 | int main {
| ^
evenorodd.cpp:6:2: error: ‘cin’ does not name a type
6 | cin >> numb;
| ^~~
evenorodd.cpp:7:2: error: expected unqualified-id before ‘if’
7 | if (numb % 2 == 0) {
| ^~
evenorodd.cpp:10:2: error: expected unqualified-id before ‘else’
10 | else: {
| ^~~~
evenorodd.cpp:14:1: error: expected declaration before ‘}’ token
14 | }
| ^