Advertisement
Guest User

MJAU

a guest
Nov 12th, 2019
91
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.52 KB | None | 0 0
  1. #include <stdio.h>
  2. int main()
  3. {
  4. int n,m,i,h,g,countc=0, countpc=0;
  5. scanf("%d %d", &n, &m);
  6. for(i=n; i<=m; i++)
  7. {
  8. g=i;
  9. while(g!=0)
  10. {
  11. g=g/10;
  12. countc++;
  13. }
  14. h=i;
  15. while(h>0)
  16. {
  17. if((h%10)%2==0)
  18. {countpc++;
  19. h=h/10;}
  20. }
  21. if(countc==countpc)
  22. {
  23. break;
  24. }
  25. else
  26. printf("NSN");
  27.  
  28. }
  29. return 0;
  30.  
  31. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement