How to Write a C program to find maximum between two numbers ?

Write a C program to find maximum between two numbers.



  1. /*Write a C program to find maximum between two numbers */
  2. #include <stdio.h>
  3. int main ()
  4. {
  5.     int a,b;
  6.     printf("Find the maximum between two number: ");
  7.     scanf("%d %d", &a, &b);
  8.     if ( a < b ){
  9.         printf("Minimum Number:%d\n",a);
  10.     }
  11.     if ( a > b ){
  12.         printf("Maximum Number%d\n",b);
  13.     }
  14.     return 0;
  15. }


Learn More :