#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 | #64725347 | Utilizator | |
| Fișier | sort10.cpp | Dimensiune | 763 B |
| Data încărcării | 26 Mai 2026, 10:36 | Scor/rezultat | Eroare de compilare |
sort10.cpp: In function ‘int main()’: sort10.cpp:23:20: warning: init-statement in selection statements only available with ‘-std=c++17’ or ‘-std=gnu++17’ [-Wc++17-extensions] 23 | if(a[i]>a[i+1]; | ^ sort10.cpp:23:24: warning: statement has no effect [-Wunused-value] 23 | if(a[i]>a[i+1]; | ~~~~^~~~~~~ sort10.cpp:24:33: error: expected ‘)’ before ‘;’ token 24 | a[i+1]=a[i+2]; | ^ | ) sort10.cpp:23:19: note: to match this ‘(’ 23 | if(a[i]>a[i+1]; | ^ sort10.cpp:24:26: warning: suggest parentheses around assignment used as truth value [-Wparentheses] 24 | a[i+1]=a[i+2]; | ~~~~~~^~~~~~~ sort10.cpp:23:17: warning: this ‘if’ clause does not guard... [-Wmisleading-indentation] 23 | if(a[i]>a[i+1]; | ^~ sort10.cpp:25:20: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the ‘if’ 25 | a[i+2]=a[i]; | ^ sort10.cpp:36:2: error: expected ‘}’ at end of input 36 | } | ^ sort10.cpp:11:5: note: to match this ‘{’ 11 | { | ^ sort10.cpp:36:2: error: expected ‘}’ at end of input 36 | } | ^ sort10.cpp:3:11: note: to match this ‘{’ 3 | int main(){ | ^
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ă.