Borderou de evaluare (job #767748)
Utilizator |
|
IP | ascuns |
---|---|---|---|
Problemă | Șir7 (clasa a 5-a) | Compilator | cpp-32 |
Rundă | Arhiva de probleme | Status | evaluat |
Dată | 13 mar. 2024 12:44:55 | Scor | 0 |
Raport evaluator
Eroare de compilare:
main.cpp: In function 'int main()':
main.cpp:6:5: error: 'cin' was not declared in this scope
6 | cin >> n >> k;
| ^~~
main.cpp:2:1: note: 'std::cin' is defined in header '<iostream>'; did you forget to '#include <iostream>'?
1 | #include <fstream>
+++ |+#include <iostream>
2 | using namespace std;
main.cpp:13:17: error: 'cout' was not declared in this scope
13 | if(ok == 0) cout << -1;
| ^~~~
main.cpp:13:17: note: 'std::cout' is defined in header '<iostream>'; did you forget to '#include <iostream>'?
main.cpp:14:10: error: 'cout' was not declared in this scope
14 | else cout << cnt + 1;
| ^~~~
main.cpp:14:10: note: 'std::cout' is defined in header '<iostream>'; did you forget to '#include <iostream>'?
main.cpp:15:14: error: expected '}' at end of input
15 | return 0;
| ^
main.cpp:4:1: note: to match this '{'
4 | {
| ^