#163
stergere
Să se șteargă dintr-un vector toate elementele care sunt numere prime.
Problema | stergere | Operații I/O | tastatură/ecran |
---|---|---|---|
Limita timp | 0.1 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
Id soluție | #54372022 | Utilizator | |
Fișier | stergere.cpp | Dimensiune | 553 B |
Data încărcării | 26 Noiembrie 2024, 21:17 | Scor / rezultat | Eroare de compilare |
stergere.cpp: In function 'int main()': stergere.cpp:9:10: error: 'i' was not declared in this scope for(i=1;i<=n;i++) ^ stergere.cpp:12:10: error: 'i' was not declared in this scope for(i=1;i<=n;i++){ ^ stergere.cpp:16:21: error: 'p' was not declared in this scope auxv/=d,p++; ^ stergere.cpp:17:16: error: 'p' was not declared in this scope auxv*=(p+1); ^ stergere.cpp:20:14: error: expected primary-expression before '}' token } ^ stergere.cpp:20:14: error: expected ';' before '}' token stergere.cpp:14:18: warning: unused variable 'k' [-Wunused-variable] int d=2, k=1; ^ stergere.cpp:21:12: error: 'k' was not declared in this scope if(k==2){ ^ stergere.cpp:22:22: error: 'i' was not declared in this scope for(int j=i+1;j<=n;j++) ^ stergere.cpp:25:12: error: 'i' was not declared in this scope i--; ^ stergere.cpp: At global scope: stergere.cpp:28:9: error: expected unqualified-id before 'for' for(i=1;i<=n;i++) ^ stergere.cpp:28:17: error: 'i' does not name a type for(i=1;i<=n;i++) ^ stergere.cpp:28:22: error: 'i' does not name a type for(i=1;i<=n;i++) ^ stergere.cpp:30:5: error: expected unqualified-id before 'return' return 0; ^ stergere.cpp:31:1: error: expected declaration before '}' token } ^
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema stergere 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ă.