#633
Paritate1
Se dă un șir cu n
elemente, numere naturale. Determinați diferența în valoare absolută dintre numărul de valori pare din șir și numărul de valori impare din șir.
Problema | Paritate1 | Operații I/O | tastatură/ecran |
---|---|---|---|
Limita timp | 0.1 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
Id soluție | #50482386 | Utilizator | |
Fișier | paritate1.cpp | Dimensiune | 387 B |
Data încărcării | 11 Aprilie 2024, 09:39 | Scor / rezultat | Eroare de compilare |
paritate1.cpp: In function 'int main()': paritate1.cpp:7:32: error: expected ',' or ';' before 'i' int v[1001], n,kp=0, ki=0. i; ^ paritate1.cpp:9:9: error: 'i' was not declared in this scope for(i=1; i<n; i++) ^ paritate1.cpp:25:14: error: expected primary-expression before ')' token for () ^ paritate1.cpp:25:14: error: expected ';' before ')' token paritate1.cpp:27:5: error: expected primary-expression before '}' token } ^ paritate1.cpp:27:5: error: expected ';' before '}' token paritate1.cpp:27:5: error: expected primary-expression before '}' token paritate1.cpp:27:5: error: expected ')' before '}' token paritate1.cpp:27:5: error: expected primary-expression before '}' token paritate1.cpp:27:5: error: expected ';' before '}' token paritate1.cpp:27:5: error: expected '}' at end of input
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema Paritate1 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ă.