Problem evenorodd
User ZacharyTan2010
Submission Time 2024-02-05 16:23:18
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{int a;cin>>a
| ^~~~
evenorodd.cpp:4:10: error: expected primary-expression before ‘int’
4 | int main{int a;cin>>a
| ^~~
evenorodd.cpp:4:10: error: expected ‘}’ before ‘int’
evenorodd.cpp:4:16: error: ‘cin’ does not name a type
4 | int main{int a;cin>>a
| ^~~
evenorodd.cpp:5:28: error: expected unqualified-id before ‘else’
5 | if(a%2==0){cout<<"Even"}else{cout<<"Odd"}}
| ^~~~
evenorodd.cpp:5:45: error: expected declaration before ‘}’ token
5 | if(a%2==0){cout<<"Even"}else{cout<<"Odd"}}
| ^