Advertisement
Guest User

Untitled

a guest
May 27th, 2016
59
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.21 KB | None | 0 0
  1. int max(int num1, int num2)
  2. {
  3.     if(num1 > num2)
  4.         return num1;
  5.     return num2;
  6. }
  7. int r_find_max(int *item, int length)
  8. {
  9.     if(0 == length)
  10.         return *item;
  11.     return max(*item, r_find_max(item + 1, length - 1));
  12. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement