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