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