Problem exam
User Yicen
Submission Time 2024-02-23 22:42:03
Score 0
Max Time N/A
Max Memory N/A

Compile Error

exam.cpp: In function ‘int main()’:
exam.cpp:5:10: error: expected ‘;’ before ‘if’
5 | cin >> x
| ^
| ;
6 | if (x==1) {
| ~~
exam.cpp:8:5: error: ‘else’ without a previous ‘if’
8 | } else if (x==2) {
| ^~~~
exam.cpp:10:17: error: expected ‘;’ before ‘cout’
10 | cin >> a >> b
| ^
| ;
11 | cout << a*b;
| ~~~~