Write a program to find the maximum value between three numbers

#include<stdio.h>
#include<conio.h>
int main()
{
int a,b,c;
printf("enter the value of a");
scanf("%d",&a);
printf("enter the value of b");
scanf("%d",&b);
printf("enter the value of c");
scanf("%d",&c);
if(a<b)
{
if(a<c)
printf("a is min");
else
printf("c is min");
}
else
{
if(b<c)
printf("b is min");
else
printf("c is min");
}
}

No comments:

Post a Comment