Radoan_Ahmed

Untitled

Jul 8th, 2019
81
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.41 KB | None | 0 0
  1. //a C program to find the maximum value among three numbers using function.
  2. #include<stdio.h>
  3. void large_num(int a,int b,int c)
  4. {
  5.     if(a>b&&a>c)
  6.     {
  7.         printf("%d",a);
  8.     }
  9.      else if(b>a&&b>c)
  10.     {
  11.         printf("%d",b);
  12.     }
  13.      else if(c>b&&c>a)
  14.     {
  15.         printf("%d",c);
  16.     }
  17. }
  18. int main()
  19. {
  20.     int a,b,c;
  21.     scanf("%d%d%d",&a,&b,&c);
  22.     large_num(a,b,c);
  23.     return 0;
  24. }
Add Comment
Please, Sign In to add comment