/* Finding max among three
numbers */
#include<stdio.h>
#include<conio.h>
void main()
{
int no1,no2,no3;
clrscr();
printf("Enter three Numbers : ");
scanf("%d%d%d",&no1,&no2,&no3);
if(no1==no2&&no2==no3)
printf("\nAll Numbers are SAME");
}
else
{
if(no1>no2&&no1>no3)
printf("\n%d is max",no1);
if(no2>no1&&no2>no3)
printf("\n%d is max",no2);
else
printf("\n%d is max",no3);
}

No comments:
Post a Comment