/* 3 program of largest number from given 3 numbers */
#include<stdio.h>
#include<conio.h>
void main()
{
int a,b,c;
clrscr();
printf("Enter 3 number a, b and c :\n");
scanf("%d %d %d",&a,&b,&c);
if(a>b && a>c)
puts("a is the greatest");
else if(b>c)
puts("b is the greatest");
else
puts("c is the greatest");
getch();
}
#include<stdio.h>
#include<conio.h>
void main()
{
int a,b,c;
clrscr();
printf("Enter 3 number a, b and c :\n");
scanf("%d %d %d",&a,&b,&c);
if(a>b && a>c)
puts("a is the greatest");
else if(b>c)
puts("b is the greatest");
else
puts("c is the greatest");
getch();
}
No comments:
Post a Comment