#4146
Se dă un vector cu n elemente, numere naturale. Afișați în ordine descrescătoare valorile divizibile cu 10 din acest vector.
| Problema | Sort10 | Operații I/O |
tastatură/ecran
|
|---|---|---|---|
| Limita timp | 0.1 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
| Id soluție | #64724889 | Utilizator | |
| Fișier | sort10.cpp | Dimensiune | 430 B |
| Data încărcării | 26 Mai 2026, 10:27 | Scor/rezultat | Eroare de compilare |
sort10.cpp: In function ‘int main()’: sort10.cpp:15:26: error: expected ‘]’ before ‘)’ token 15 | if(v[i]>v[i+1) | ^ | ] sort10.cpp:20:18: error: ‘k’ was not declared in this scope; did you mean ‘ok’? 20 | k=0; | ^ | ok sort10.cpp:23:11: error: expected primary-expression before ‘}’ token 23 | } | ^ sort10.cpp:23:12: error: expected ‘while’ at end of input 23 | } | ^ sort10.cpp:23:12: error: expected ‘(’ at end of input 23 | } | ^ | ( sort10.cpp:23:12: error: expected primary-expression at end of input sort10.cpp:23:12: error: expected ‘)’ at end of input 23 | } | ^ | ) sort10.cpp:23:12: error: expected ‘;’ at end of input 23 | } | ^ | ; sort10.cpp:23:12: error: expected ‘}’ at end of input sort10.cpp:4:1: note: to match this ‘{’ 4 | { | ^ sort10.cpp:5:23: warning: unused variable ‘j’ [-Wunused-variable] 5 | int v[50],i,n,aux,j,ok; | ^
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema Sort10 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ă.