#include <iostream>
using namespace std;
class set
{
int m, n;
public:
void input ();
void display ();
int largest ();
};
int set::largest ()
{
if(m>=n)
return (m);
else
return(n);
}
void set::input ()
{
cout <<"Enter the two inputs :"<<endl;
cin >>m>>n;
cout <<m<<"\t"<<n;
}
void set ::display()
{
cout <<"\n largest value ="<<largest()<<endl;
}
int main() {
set A;
A. input ();
A. display();
return 0;
}
To embed this program on your website, copy the following code and paste it into your website's HTML: