#include<stdio.h>
#include<conio.h>
void main()
{
int a,b;
clrscr();
printf("\n Enter two numbers : ");
scanf(" %d %d ",&a,&b);
if(a>b)
printf(" %d is greater ",a);
else
printf(" %d is greater ",b);
getch();
}
Note : In this program we use if-else statement. In this if condition is true then if statement block is executed otherwise else statement block is executed .
#include<conio.h>
void main()
{
int a,b;
clrscr();
printf("\n Enter two numbers : ");
scanf(" %d %d ",&a,&b);
if(a>b)
printf(" %d is greater ",a);
else
printf(" %d is greater ",b);
getch();
}
Note : In this program we use if-else statement. In this if condition is true then if statement block is executed otherwise else statement block is executed .
No comments:
Post a Comment