#include<conio.h>
#include<iostream.h>
float large(float, float, float);
void main()
{
clrscr();
float a, b, c, l;
cout<<"Enter Number: ";
cin>>a;
cout<<"Enter Number: ";
cin>>b;
cout<<"Enter Number: ";
cin>>c;
l=large(a, b, c);
cout<<"Smallest no is: "<<l;
getch();
}
float large(float x, float y, float z)
{
float n=0;
if (x<y && x<z)
n=x;
else if (y<x && y<z)
n=y;
else if (z<x && z<y)
n=z;
return(n);
}
Output |
No comments:
Post a Comment