Write a program to find the greater among two numbers using if-else statement.
#inlcude<stdio.h>
#include<conio.h>
void main()
{
int a,b;
clrscr();
printf(“Enter the two numbers:”);
scanf(“%d%d”,&a,&b);
if(a>b)
{
printf(“First number is greater than second number”);
}
else
{
printf(“Second number is greater than first number”);
}
getch();
}
Output:-
Also read:- Sum of two numbers.

0 Comments
Have any query? Want any type of module?
Please comment it down and let me know.