Que : Write a C program to find minimum between three numbers.
Ans :
#include<stdio.h>
int main()
{
int a,b,c;
printf("Enter the three numbers : ");
scanf("%d %d %d",&a,&b,&c);
if(a<b)
{
if(a<c)
printf("the smaller number is :%d",a);
else
printf("the smaller number is :%d",c);
}
else
{
if(b<c)
printf("the smaller number is :%d",b);
else
printf("the smaller number is :%d",c);
}
return 0;
}
Input :
Comments
Post a Comment