Ad Code

Write a program to find the greater among two numbers using if-else statement.

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:-

Post a Comment

0 Comments

Ad Code