Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Int cifminpar(int n)
- {
- if(n < 10) if(n % 2 == 0) return n;
- else return -1;
- else
- {
- int x = cifminpar(n / 10);
- if(n % 2 == 1) return x;
- else if(x < n % 10 && x != -1) return x;
- else return n % 10;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement