Problem exam
User Sirum1008
Submission Time 2023-11-08 13:35:58
Score 0
Max Time N/A
Max Memory N/A

Compile Error

exam.cpp: In function ‘int main()’:
exam.cpp:5:6: error: ‘x’ was not declared in this scope
5 | if (x== 1) {
| ^
exam.cpp:7:2: error: expected ‘}’ before ‘else’
7 | else if (x == 2) {
| ^~~~
exam.cpp:5:13: note: to match this ‘{’
5 | if (x== 1) {
| ^
exam.cpp:11:11: error: expected ‘;’ at end of input
11 | return 0
| ~^
| ;
exam.cpp:11:10: error: expected ‘}’ at end of input
11 | return 0
| ^
exam.cpp:7:19: note: to match this ‘{’
7 | else if (x == 2) {
| ^
exam.cpp:11:10: error: expected ‘}’ at end of input
11 | return 0
| ^
exam.cpp:4:11: note: to match this ‘{’
4 | int main(){
| ^