#452
cifimp
Se citește de la tastatură un număr natural de 3
cifre. Să se determine câte cifre impare conține.
Problema | cifimp | Operații I/O | tastatură/ecran |
---|---|---|---|
Limita timp | 0.1 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
Id soluție | #55060228 | Utilizator | |
Fișier | cifimp.cpp | Dimensiune | 518 B |
Data încărcării | 19 Decembrie 2024, 13:21 | Scor / rezultat | Eroare de compilare |
cifimp.cpp: In function 'int main()': cifimp.cpp:6:10: error: expected primary-expression before '!=' token if(n/100%!=0 && n/10%10%!=0 && n%10%!=0) cout<<3; ^ cifimp.cpp:6:25: error: expected primary-expression before '!=' token if(n/100%!=0 && n/10%10%!=0 && n%10%!=0) cout<<3; ^ cifimp.cpp:6:37: error: expected primary-expression before '!=' token if(n/100%!=0 && n/10%10%!=0 && n%10%!=0) cout<<3; ^ cifimp.cpp:7:16: error: expected primary-expression before '=' token else if(n/100%==0 && n/10%10%==0 && n%10%==0) cout<<0; ^ cifimp.cpp:7:31: error: expected primary-expression before '=' token else if(n/100%==0 && n/10%10%==0 && n%10%==0) cout<<0; ^ cifimp.cpp:7:43: error: expected primary-expression before '=' token else if(n/100%==0 && n/10%10%==0 && n%10%==0) cout<<0; ^ cifimp.cpp:8:15: error: expected primary-expression before '!=' token else if(n/100%!=0 && n/10%10%==0 && n%10%==0) cout<<1; ^ cifimp.cpp:8:31: error: expected primary-expression before '=' token else if(n/100%!=0 && n/10%10%==0 && n%10%==0) cout<<1; ^ cifimp.cpp:8:43: error: expected primary-expression before '=' token else if(n/100%!=0 && n/10%10%==0 && n%10%==0) cout<<1; ^ cifimp.cpp:9:16: error: expected primary-expression before '=' token else if(n/100%==0 && n/10%10%!=0 && n%10%==0) cout<<1; ^ cifimp.cpp:9:30: error: expected primary-expression before '!=' token else if(n/100%==0 && n/10%10%!=0 && n%10%==0) cout<<1; ^ cifimp.cpp:9:43: error: expected primary-expression before '=' token else if(n/100%==0 && n/10%10%!=0 && n%10%==0) cout<<1; ^ cifimp.cpp:10:16: error: expected primary-expression before '=' token else if(n/100%==0 && n/10%10%==0 && n%10%!=0) cout<<1; ^ cifimp.cpp:10:31: error: expected primary-expression before '=' token else if(n/100%==0 && n/10%10%==0 && n%10%!=0) cout<<1; ^ cifimp.cpp:10:42: error: expected primary-expression before '!=' token else if(n/100%==0 && n/10%10%==0 && n%10%!=0) cout<<1; ^ cifimp.cpp:11:15: error: expected primary-expression before '!=' token else if(n/100%!=0 && n/10%10%!=0 && n%10%==0) cout<<2; ^ cifimp.cpp:11:30: error: expected primary-expression before '!=' token else if(n/100%!=0 && n/10%10%!=0 && n%10%==0) cout<<2; ^ cifimp.cpp:11:43: error: expected primary-expression before '=' token else if(n/100%!=0 && n/10%10%!=0 && n%10%==0) cout<<2; ^ cifimp.cpp:12:15: error: expected primary-expression before '!=' token else if(n/100%!=0 && n/10%10%==0 && n%10%!=0) cout<<2; ^ cifimp.cpp:12:31: error: expected primary-expression before '=' token else if(n/100%!=0 && n/10%10%==0 && n%10%!=0) cout<<2; ^ cifimp.cpp:12:42: error: expected primary-expression before '!=' token else if(n/100%!=0 && n/10%10%==0 && n%10%!=0) cout<<2; ^ cifimp.cpp:13:16: error: expected primary-expression before '=' token else if(n/100%==0 && n/10%10%!=0 && n%10%!=0) cout<<2; ^ cifimp.cpp:13:30: error: expected primary-expression before '!=' token else if(n/100%==0 && n/10%10%!=0 && n%10%!=0) cout<<2; ^ cifimp.cpp:13:42: error: expected primary-expression before '!=' token else if(n/100%==0 && n/10%10%!=0 && n%10%!=0) cout<<2; ^
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema cifimp 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ă.