Problem exam
User sy123
Submission Time 2023-11-11 20:51:58
Score 0
Max Time N/A
Max Memory N/A

Compile Error

exam.cpp: In function ‘int main()’:
exam.cpp:6:2: error: ‘cin’ was not declared in this scope; did you mean ‘std::cin’?
6 | cin>>value;
| ^~~
| std::cin
In file included from exam.cpp:1:
/usr/include/c++/9/iostream:60:18: note: ‘std::cin’ declared here
60 | extern istream cin; /// Linked to standard input
| ^~~
exam.cpp:7:5: error: ‘x’ was not declared in this scope
7 | if(x=1){
| ^
exam.cpp:9:2: error: expected ‘}’ before ‘else’
9 | else if(x=2){
| ^~~~
exam.cpp:7:9: note: to match this ‘{’
7 | if(x=1){
| ^
exam.cpp:14:2: error: expected ‘}’ at end of input
14 | }
| ^
exam.cpp:2:11: note: to match this ‘{’
2 | int main(){
| ^