Problem exam
User zixin
Submission Time 2023-11-10 10:21:27
Score 0
Max Time N/A
Max Memory N/A

Compile Error

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