Advertisement
Mahfuz100

zahid

May 17th, 2018
129
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.40 KB | None | 0 0
  1.  
  2. /**
  3.  * C program to find maximum between two numbers
  4.  */
  5.  
  6. #include <stdio.h>
  7.  
  8. int main()
  9. {
  10.     int num1, num2;
  11.  
  12.     /* Input two numbers from user */
  13.     printf("Enter two numbers: \n");
  14.     scanf("%d%d", &num1, &num2);
  15.  
  16.  
  17.     if(num1 > num2)
  18.     {
  19.  
  20.         printf("\n%d is maximum\n", num1);
  21.     }
  22.     else
  23.     {
  24.  
  25.         printf("\n%d is maximum\n", num2);
  26.     }
  27.  
  28.     return 0;
  29. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement