Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- int rekurzija(*broj)
- {
- int tmp,max=0;
- if(*broj==0)
- return 0;
- else
- tmp=*broj%10;
- if(max>tmp)
- tmp=max;
- return rekurzija(broj/10);
- }
- int main()
- {
- int broj;
- while(scanf("%d",&broj))
- {
- printf("%d",rekurzija(&broj));
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement