#2858
Se consideră un șir a1, a2, …, an de numere naturale.
10.3 și aflate pe poziții impare.| Problema | pv | Operații I/O |
tastatură/ecran
|
|---|---|---|---|
| Limita timp | 0.1 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
| Id soluție | #64248625 | Utilizator | |
| Fișier | pv.cpp | Dimensiune | 732 B |
| Data încărcării | 25 Aprilie 2026, 17:24 | Scor/rezultat | Eroare de compilare |
pv.cpp:1:10: error: #include expects "FILENAME" or <FILENAME> 1 | #include ,iostream> | ^ pv.cpp: In function ‘int main()’: pv.cpp:6:5: error: ‘cin’ was not declared in this scope 6 | cin << n; | ^~~ pv.cpp:1:1: note: ‘std::cin’ is defined in header ‘<iostream>’; did you forget to ‘#include <iostream>’? +++ |+#include <iostream> 1 | #include ,iostream> pv.cpp:13:9: error: ‘cout’ was not declared in this scope 13 | cout << v[i]<< " "; | ^~~~ pv.cpp:13:9: note: ‘std::cout’ is defined in header ‘<iostream>’; did you forget to ‘#include <iostream>’? pv.cpp:14:17: error: ‘endl’ was not declared in this scope 14 | cout << endl; | ^~~~ pv.cpp:1:1: note: ‘std::endl’ is defined in header ‘<ostream>’; did you forget to ‘#include <ostream>’? +++ |+#include <ostream> 1 | #include ,iostream> pv.cpp:18:13: error: ‘s’ was not declared in this scope 18 | s += v[i]; | ^ pv.cpp:36:5: error: ‘cout’ was not declared in this scope 36 | cout << s << endl << t << endl << k << endl << u; | ^~~~ pv.cpp:36:5: note: ‘std::cout’ is defined in header ‘<iostream>’; did you forget to ‘#include <iostream>’? pv.cpp:36:13: error: ‘s’ was not declared in this scope 36 | cout << s << endl << t << endl << k << endl << u; | ^ pv.cpp:36:18: error: ‘endl’ was not declared in this scope 36 | cout << s << endl << t << endl << k << endl << u; | ^~~~ pv.cpp:36:18: note: ‘std::endl’ is defined in header ‘<ostream>’; did you forget to ‘#include <ostream>’?
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema pv face parte din prima categorie. Soluția propusă de tine va fi evaluată astfel:
Suma punctajelor acordate pe testele utilizate pentru verificare este 100. Astfel, soluția ta poate obține cel mult 100 de puncte, caz în care se poate considera corectă.