#1453
stergere1
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 | #50551279 | Utilizator | |
Fișier | stergere1.cpp | Dimensiune | 213 B |
Data încărcării | 14 Aprilie 2024, 22:14 | Scor / rezultat | Eroare de compilare |
stergere1.cpp: In function 'int main()': stergere1.cpp:6:18: warning: format '%d' expects argument of type 'int*', but argument 2 has type 'int (*)[1000]' [-Wformat=] scanf("%d",&a); ^ stergere1.cpp:7:20: error: 'n' was not declared in this scope for(int i=1;i<=n;i++) ^ stergere1.cpp:8:24: warning: format '%d' expects argument of type 'int*', but argument 2 has type 'int' [-Wformat=] scanf("%d",a[i]); ^ stergere1.cpp: At global scope: stergere1.cpp:13:1: error: expected declaration before '}' token } ^ stergere1.cpp: In function 'int main()': stergere1.cpp:6:19: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result] scanf("%d",&a); ^ stergere1.cpp:8:25: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result] scanf("%d",a[i]); ^ stergere1.cpp:9:19: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result] scanf("%d",&b); ^
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ă.