#509
Să se scrie un program care ordonează crescător elementele unui vector.
| Problema | Ordonare | Operații I/O |
tastatură/ecran
|
|---|---|---|---|
| Limita timp | 0.1 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
| Id soluție | #64336969 | Utilizator | |
| Fișier | ordonare.cpp | Dimensiune | 771 B |
| Data încărcării | 30 Aprilie 2026, 11:53 | Scor/rezultat | Eroare de compilare |
ordonare.cpp: In function ‘int main()’: ordonare.cpp:34:9: warning: this ‘while’ clause does not guard... [-Wmisleading-indentation] 34 | while (sortat == false); | ^~~~~ ordonare.cpp:36:13: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the ‘while’ 36 | for (i = 0; i < n; i++) | ^~~ ordonare.cpp:40:18: error: expected ‘}’ at end of input 40 | return 0; | ^ ordonare.cpp:15:8: note: to match this ‘{’ 15 | do { | ^ ordonare.cpp:40:18: error: expected ‘while’ at end of input 40 | return 0; | ^ ordonare.cpp:40:18: error: expected ‘(’ at end of input 40 | return 0; | ^ | ( ordonare.cpp:40:18: error: expected primary-expression at end of input ordonare.cpp:40:18: error: expected ‘)’ at end of input 40 | return 0; | ^ | ) ordonare.cpp:40:18: error: expected ‘;’ at end of input 40 | return 0; | ^ | ; ordonare.cpp:40:18: error: expected ‘}’ at end of input ordonare.cpp:5:1: note: to match this ‘{’ 5 | { | ^
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema Ordonare 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ă.