#1453
Să se șteargă dintr-un vector toate elementele pare.
| Problema | stergere1 | Operații I/O |
tastatură/ecran
|
|---|---|---|---|
| Limita timp | 0.1 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
| Id soluție | #64311921 | Utilizator | |
| Fișier | stergere1.cpp | Dimensiune | 299 B |
| Data încărcării | 29 Aprilie 2026, 09:39 | Scor/rezultat | Eroare de compilare |
stergere1.cpp: In function ‘int main()’: stergere1.cpp:8:17: error: expected ‘)’ before ‘;’ token 8 | for(i=1;i<=n;i++;) | ~ ^ | ) stergere1.cpp:8:1: warning: this ‘for’ clause does not guard... [-Wmisleading-indentation] 8 | for(i=1;i<=n;i++;) | ^~~ stergere1.cpp:8:18: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the ‘for’ 8 | for(i=1;i<=n;i++;) | ^ stergere1.cpp:8:18: error: expected primary-expression before ‘)’ token stergere1.cpp:13:5: warning: this ‘for’ clause does not guard... [-Wmisleading-indentation] 13 | for(i=p;i<n;i++) | ^~~ stergere1.cpp:15:9: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the ‘for’ 15 | n=n-1; | ^ stergere1.cpp:18:1: warning: this ‘for’ clause does not guard... [-Wmisleading-indentation] 18 | for(i=1;i<=n;i++) | ^~~ stergere1.cpp:20:5: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the ‘for’ 20 | return 0; | ^~~~~~
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema stergere1 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ă.