Problem exam
User senkyte
Submission Time 2024-02-05 12:32:51
Score 0
Max Time N/A
Max Memory N/A

Compile Error

exam.cpp:2:6: error: ‘cin’ in namespace ‘std’ does not name a type
2 | std::cin >> int option;
| ^~~
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: In function ‘int main()’:
exam.cpp:4:5: error: ‘option’ was not declared in this scope
4 | if(option == 1){
| ^~~~~~
exam.cpp:5:29: error: expected ‘;’ before ‘}’ token
5 | std::cout << "Hello World"
| ^
| ;
6 | }
| ~
exam.cpp:12:33: error: expected ‘;’ before ‘}’ token
12 | std::cout << number1 + number2
| ^
| ;
13 | }
| ~