Guest User

Untitled

a guest
May 23rd, 2018
111
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.18 KB | None | 0 0
  1. int rec1(unsigned int x) {
  2.   if(!x) return 0;
  3.   return x%10 - rec1(x/10);
  4. }
  5.  
  6. int rec(unsigned int x) {
  7.   return (rec1(x) == 0);
  8. }
  9. ...
  10. x = rec(44);
  11. x = rec(231);
  12. x = rec(17);
Add Comment
Please, Sign In to add comment