Wednesday, August 15, 2012

Write a Program to find Minimum and Maximum Number



#include<stdio.h>
#include<conio.h>
void main()
{
int a,b,c;
clrscr();
printf(“Enter Your First Value=”);
scanf(“%d”,&a);
printf(“Enter Your Second Value=”);
scanf(“%d”,&b);
printf(“Enter Your Third Value=”);
scanf(“%d”,&c);

if(a>b && a>c)
{
printf(“Your First Value is Higher”);
}

if(b>a && b>c)
{
printf(“\nYour Second Value is Higher”);
}

if(c>a && c>b)
{
printf(“\nYour Third Value is Higher”);
}

if(a<b && a<c)
{
printf(“\nYour First Value is Minimim”);
}

if(b<a && b<c)
{
printf(“\nYour Second Value is Minimim”);
}

if(c<a && c<b)
{
printf(“\nYour Third Value is Minimim”);
}
getch();
}