#1408
Se dau n numere naturale. Calculați câte dintre ele sunt prime, cel mai mare și cel mai mic număr prim.
| Problema | Numere10 | Operații I/O |
tastatură/ecran
|
|---|---|---|---|
| Limita timp | 1 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
| Id soluție | #64708327 | Utilizator | |
| Fișier | numere10.cpp | Dimensiune | 412 B |
| Data încărcării | 25 Mai 2026, 12:18 | Scor/rezultat | Eroare de compilare |
numere10.cpp: In function ‘int main()’: numere10.cpp:8:7: error: ‘INT_MIN’ was not declared in this scope 8 | Max=INT_MIN; | ^~~~~~~ numere10.cpp:3:1: note: ‘INT_MIN’ is defined in header ‘<climits>’; did you forget to ‘#include <climits>’? 2 | #include<iomanip> +++ |+#include <climits> 3 | using namespace std; numere10.cpp:9:7: error: ‘INT_MAX’ was not declared in this scope 9 | Min=INT_MAX; | ^~~~~~~ numere10.cpp:9:7: note: ‘INT_MAX’ is defined in header ‘<climits>’; did you forget to ‘#include <climits>’? numere10.cpp:15:3: warning: this ‘for’ clause does not guard... [-Wmisleading-indentation] 15 | for(d=2;d*d<=x;d++) | ^~~ numere10.cpp:18:4: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the ‘for’ 18 | if(ok==1){ | ^~ numere10.cpp: At global scope: numere10.cpp:26:1: error: ‘cout’ does not name a type 26 | cout<<nr<<""<<Min<<""<<Max; | ^~~~ numere10.cpp:27:1: error: ‘reurn’ does not name a type 27 | reurn 0; | ^~~~~
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema Numere10 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ă.