Advertisement
Guest User

adwadsw

a guest
Nov 21st, 2017
77
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.26 KB | None | 0 0
  1. Int cifminpar(int n)
  2. {
  3. if(n < 10) if(n % 2 == 0) return n;
  4. else return -1;
  5. else
  6. {
  7. int x = cifminpar(n / 10);
  8. if(n % 2 == 1) return x;
  9. else if(x < n % 10 && x != -1) return x;
  10. else return n % 10;
  11. }
  12. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement