Problem exam
User yihai
Submission Time 2026-01-21 17:00:54
Score 0
Max Time N/A
Max Memory N/A

Compile Error

exam.cpp: In function ‘int main()’:
exam.cpp:6:8: error: ‘x’ was not declared in this scope
6 | cin >>x;
| ^
exam.cpp:10:9: error: ‘a’ was not declared in this scope
10 | cin >>a >>b;
| ^
exam.cpp:10:13: error: ‘b’ was not declared in this scope
10 | cin >>a >>b;
| ^
exam.cpp:11:7: error: expected ‘;’ before ‘a’
11 | cout a*b;
| ^~
| ;
exam.cpp:11:11: error: expected ‘}’ at end of input
11 | cout a*b;
| ^
exam.cpp:9:16: note: to match this ‘{’
9 | }else if(x==2){;
| ^
exam.cpp:11:11: error: expected ‘}’ at end of input
11 | cout a*b;
| ^
exam.cpp:4:15: note: to match this ‘{’
4 | signed main() {
| ^