#4933
Se dă un număr natural nenul n. Calculați și afișați numărul obținut prin înlocuirea cu 0 a tuturor cifrelor pare din numărul n.
| Problema | numarnou0 | Operații I/O |
tastatură/ecran
|
|---|---|---|---|
| Limita timp | 0.1 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
| Id soluție | #64800258 | Utilizator | |
| Fișier | numarnou0.cpp | Dimensiune | 514 B |
| Data încărcării | 02 Iunie 2026, 10:31 | Scor/rezultat | Eroare de compilare |
numarnou0.cpp: In function ‘int main()’: numarnou0.cpp:10:9: warning: this ‘if’ clause does not guard... [-Wmisleading-indentation] 10 | if(c%2==0); c=0; | ^~ numarnou0.cpp:10:21: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the ‘if’ 10 | if(c%2==0); c=0; | ^ numarnou0.cpp:19:9: warning: empty parentheses were disambiguated as a function declaration [-Wvexing-parse] 19 | int main() | ^~ numarnou0.cpp:19:9: note: remove parentheses to default-initialize a variable 19 | int main() | ^~ | -- numarnou0.cpp:19:9: note: or replace parentheses with braces to value-initialize a variable numarnou0.cpp:20:1: error: a function-definition is not allowed here before ‘{’ token 20 | { | ^ numarnou0.cpp:33:2: error: expected ‘}’ at end of input 33 | } | ^ numarnou0.cpp:4:1: note: to match this ‘{’ 4 | { | ^
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema numarnou0 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ă.