#55
Se citesc numere de la tastatură până la apariția lui zero. Să se determine minimul celor pozitive.
| Problema | MinimPozitive | Operații I/O |
tastatură/ecran
|
|---|---|---|---|
| Limita timp | 0.1 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
| Id soluție | #64278335 | Utilizator | |
| Fișier | minimpozitive.cpp | Dimensiune | 388 B |
| Data încărcării | 27 Aprilie 2026, 18:02 | Scor/rezultat | Eroare de compilare |
minimpozitive.cpp: In function ‘int main()’: minimpozitive.cpp:13:10: warning: this ‘else’ clause does not guard... [-Wmisleading-indentation] 13 | else | ^~~~ minimpozitive.cpp:16:14: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the ‘else’ 16 | ok=1; | ^~ minimpozitive.cpp:16:14: error: ‘ok’ was not declared in this scope; did you mean ‘OK’? 16 | ok=1; | ^~ | OK minimpozitive.cpp:20:8: error: ‘ok’ was not declared in this scope; did you mean ‘OK’? 20 | if(ok) | ^~ | OK minimpozitive.cpp:21:15: error: ‘mim’ was not declared in this scope; did you mean ‘min’? 21 | cout<<mim; | ^~~ | min minimpozitive.cpp:5:15: warning: unused variable ‘x’ [-Wunused-variable] 5 | int n,min,x,OK=0; | ^
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema MinimPozitive 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ă.