Guest User

Untitled

a guest
Jun 25th, 2018
97
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.21 KB | None | 0 0
  1. /* int f(int *array_name,int size)
  2. returns the greatest element of the array */
  3.  
  4. int f(int *a,int s)
  5. {
  6.     static int r=0;
  7.     int v=a[r++],l;
  8.     if(r==s)
  9.     return v;
  10.     l=f(a,s);
  11.     return (v>l?v:l);
  12. }
Add Comment
Please, Sign In to add comment