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