Advertisement
Guest User

Propo

a guest
Feb 26th, 2020
82
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.32 KB | None | 0 0
  1. #include <stdio.h>
  2.  
  3. int rekurzija(*broj)
  4. {
  5. int tmp,max=0;
  6. if(*broj==0)
  7. return 0;
  8. else
  9. tmp=*broj%10;
  10. if(max>tmp)
  11. tmp=max;
  12. return rekurzija(broj/10);
  13. }
  14.  
  15. int main()
  16. {
  17. int broj;
  18. while(scanf("%d",&broj))
  19. {
  20. printf("%d",rekurzija(&broj));
  21. }
  22.  
  23. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement