/* C++ Program To Find Minimum And Maximum Of Two Numbers Using Function */
#include <iostream>
using namespace std;
void min(int,int);
void max(int,int);
void max(int a,int b)
{
float sum=0;
if(a>b)
{
cout<<"Max of numbers is A:"<<a<<endl;
cout<<"Min of numbers is B:"<<b<<endl;
}
else
min(a,b);
}
void min(int a,int b)
{
cout<<"Max of numbers is B:"<<b<<endl;
cout<<"Min of numbers is A:"<<a<<endl;
}
int main()
{
int a, b, c;
cout<<"Enter The Values For A And B:"<<endl;
cin>>a>>b;
max(a,b);
return 0;
}
No comments:
Post a Comment