Advertisement
inhuman_Arif

Min Max

Apr 2nd, 2020
322
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.28 KB | None | 0 0
  1. #include <stdio.h>
  2.  
  3. void main()
  4. {
  5.     int a,b,Max,Min;
  6.     printf("Enter two values: ");
  7.     scanf("%d %d",&a,&b);
  8.     if(a>b)
  9.     {
  10.         Max=a;
  11.         Min=b;
  12.     }
  13.     else
  14.     {
  15.         Max=b;
  16.         Min=a;
  17.     }
  18.     printf("MAX = %d\nMIN = %d\n",Max,Min);
  19. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement