#54
Se citesc numere de la tastatură până la apariția lui zero. Să se determine maximul lor.
| Problema | Maxim | Operații I/O |
tastatură/ecran
|
|---|---|---|---|
| Limita timp | 0.1 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
| Id soluție | #64735866 | Utilizator | |
| Fișier | maxim.cpp | Dimensiune | 210 B |
| Data încărcării | 26 Mai 2026, 20:19 | Scor/rezultat | Eroare de compilare |
maxim.cpp: In function ‘int main()’: maxim.cpp:5:15: error: expected ‘)’ before ‘;’ token 5 | if(!(cin>>x; x==0); | ~ ^ | ) maxim.cpp:5:15: error: expected ‘)’ before ‘;’ token 5 | if(!(cin>>x; x==0); | ~ ^ | ) maxim.cpp:5:4: warning: this ‘if’ clause does not guard... [-Wmisleading-indentation] 5 | if(!(cin>>x; x==0); | ^~ maxim.cpp:5:17: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the ‘if’ 5 | if(!(cin>>x; x==0); | ^ maxim.cpp:5:21: error: expected ‘;’ before ‘)’ token 5 | if(!(cin>>x; x==0); | ^ | ; maxim.cpp:5:18: warning: statement has no effect [-Wunused-value] 5 | if(!(cin>>x; x==0); | ~^~~
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema Maxim 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ă.