Write a C program to find maximum or equal between two numbers ?

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


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


Learn More :