LARGEST
//write a program which will find largest
number.in given three number
#include<stdio.h>
#include<conio.h>
void main()
{
int a,b,c;
clrscr();
printf("enter three number");
scanf("%d%d%d",&a,&b,&c);
if (a<b)
if(b<c)
printf("largest no. is %d",c);
else
printf("largest no. is %d",b);
else
if(a<c)
printf("largest no. is %d",c);
else
printf("largest no. is %d",a);
getch();
}
Page 1

Gratest

  • 1.
    LARGEST //write a programwhich will find largest number.in given three number #include<stdio.h> #include<conio.h> void main() { int a,b,c; clrscr(); printf("enter three number"); scanf("%d%d%d",&a,&b,&c); if (a<b) if(b<c) printf("largest no. is %d",c); else printf("largest no. is %d",b); else if(a<c) printf("largest no. is %d",c); else printf("largest no. is %d",a); getch(); } Page 1