Write a C Program to find the maximum between two enter numbers using if else statement.

Here is the C Program to find the maximum between two numbers using the if else condition statement . Here both the number is taken as input from user.

#include<stdio.h>
#include<conio.h>
 
void main()
{             int a,b;
               clrscr();
               printf(“Enter value of a:”);
               scanf(“%d”,&a);
               printf(“Enter value of b:”);
               scanf(“%d”,&b);
               if(a>b)
              {              printf(“%d is maximum”,a);
               }
               else
              {              printf(“%d is maximum”,b);
               }
               getch();
}
 
Output

You may also like...

Leave a Reply