Code Written in Dev C++;
#include<stdio.h>
#include<conio.h>
int main()
{
int a,b,c;
printf("\n Enter 1st number:- ");
scanf("%d",&a);
printf("\n Enter 2nd number:- ");
scanf("%d",&b);
printf("\n Enter 3rd number:- ");
scanf("%d",&c);
if(a > b && a > c)
{
printf("\n\n First no. is Greater.");
}
else if(b > a && b > c)
{
printf("\n\n Second no. is Greater.");
}
else
{
printf("\n\n Third no. is Greater.");
}
return 0;
}
Code Written in Turbo C++ :-
#include<stdio.h>
#include<conio.h>
void main()
{
int a,b,c;
clrscr();
printf("\n Enter 1st number:- ");
scanf("%d",&a);
printf("\n Enter 2nd number:- ");
scanf("%d",&b);
printf("\n Enter 3rd number:- ");
scanf("%d",&c);
if(a > b && a > c)
{
printf("\n\n First no. is Greater.");
}
else if(b > a && b > c)
{
printf("\n\n Second no. is Greater.");
}
else
{
printf("\n\n Third no. is Greater.");
}
getch();
}
0 Comments