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