Saturday, June 29, 2013

Write a program to find the greatest of 3 no?

Program:
#include<stdio.h>
#include<conio.h>

void main()
{
int no1,no2,no3;
clrscr();
printf("\n enter the  no1,no2 and no3 ");
scanf("%d%d%d",&no1,&no2,&no3);

if(no1>no2&&no1>no3)
printf("\n the %d  is greater",no1);
else
if
(no2>no3)
printf("\n the %d is greater",no2);
elseprintf("\n the %d is greater",no3);
getch();
}

Output:
image



Like the Post? Do share with your Friends.

No comments:

Post a Comment