Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include<stdio.h>
- int max_num(int a,int b, int c)
- {
- int max=0;
- if(a>b && a>c)
- max=a;
- else if(b>a && b>c)
- max=b;
- else if(c>a && c>b)
- max=c;
- return max;
- }
- int main()
- {
- int a,b,c;
- scanf("%d %d %d", &a,&b,&c);
- printf("%d is the maximum", max_num(a,b,c));
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment