Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- #include <stdlib.h>
- int main() {
- int N;
- scanf("%d", &N);
- int parni_cifri = 0;
- while(N > 0) {
- int posledna_cifra = N % 10;
- if(posledna_cifra % 2 == 0) {
- parni_cifri++;
- }
- N /= 10;
- }
- printf("%d\n", parni_cifri);
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement