#include<iostream.h>
#include<conio.h>
float smallest (float a, float b , float c);
void main()
{
clrscr();
float n1, n2, n3;
cout<< "Enter three floating point numbers: ";
cin>>n1>>n2>>n3;
cout<<"The smallest floating number is: "<<smallest(n1,n2,n3);
getch();
}
float smallest (float a , float b , float c)
{
if(a<b && a<c)
return a;
else if(b<a && b<c)
return b;
else
return c;
}
#include<conio.h>
float smallest (float a, float b , float c);
void main()
{
clrscr();
float n1, n2, n3;
cout<< "Enter three floating point numbers: ";
cin>>n1>>n2>>n3;
cout<<"The smallest floating number is: "<<smallest(n1,n2,n3);
getch();
}
float smallest (float a , float b , float c)
{
if(a<b && a<c)
return a;
else if(b<a && b<c)
return b;
else
return c;
}