#include<iostream.h>
#include<conio.h>

void max(int a,int b,int c)
{
 if(a>b && a>c)
   cout<<endl<<a<<" is max!";
 else if(b>a && b>c)
   cout<<endl<<b<<" is max!";
 else
   cout<<endl<<c<<" is max!";
}

void max(float a,float b,float c)
{
 if(a>b && a>c)
   cout<<endl<<a<<" is max!";
 else if(b>a && b>c)
   cout<<endl<<b<<" is max!";
 else
   cout<<endl<<c<<" is max!";
}


int main()
{
int a,b,c;
float x,y,z;
clrscr();
cout<<endl<<"Enter 3 integer numbers: ";
cin>>a>>b>>c;
max(a,b,c);
cout<<endl<<"Enter 3 float numbers: ";
cin>>x>>y>>z;
max(x,y,z);
getch();
return 0;
}

Post a Comment

Previous Post Next Post