Problem exam
User Ningja
Submission Time 2023-11-08 10:02:55
Score 0
Max Time N/A
Max Memory N/A

Compile Error

exam.cpp:1:2: error: invalid preprocessing directive #namespace
1 | #namespace <iostream>
| ^~~~~~~~~
exam.cpp: In function ‘int main()’:
exam.cpp:5:7: error: ‘cout’ is not a member of ‘std’
5 | std::cout << "Hello World"
| ^~~~
exam.cpp:1:1: note: ‘std::cout’ is defined in header ‘<iostream>’; did you forget to ‘#include <iostream>’?
+++ |+#include <iostream>
1 | #namespace <iostream>
exam.cpp:7:7: error: ‘cin’ is not a member of ‘std’
7 | std::cin >> A >> B;
| ^~~
exam.cpp:7:7: note: ‘std::cin’ is defined in header ‘<iostream>’; did you forget to ‘#include <iostream>’?
exam.cpp:7:14: error: ‘A’ was not declared in this scope
7 | std::cin >> A >> B;
| ^
exam.cpp:7:19: error: ‘B’ was not declared in this scope
7 | std::cin >> A >> B;
| ^
exam