/* Program to find the greater between three number */
#include<stdio.h>
#include<conio.h>
void main()
{
int a,b,c;
clrscr();
printf(“Enter the values of a,b,c”);
scanf(“%d%d%d”,&a,&b,&c);
if(a>b)
{
if(a>c)
printf(“a is greater”);
else
printf(“c is greater”);
}
else if(b>c)
printf(“b is greater”);
else
printf(“c is greater”);
getch();
}
#include<conio.h>
void main()
{
int a,b,c;
clrscr();
printf(“Enter the values of a,b,c”);
scanf(“%d%d%d”,&a,&b,&c);
if(a>b)
{
if(a>c)
printf(“a is greater”);
else
printf(“c is greater”);
}
else if(b>c)
printf(“b is greater”);
else
printf(“c is greater”);
getch();
}
No comments:
Post a Comment