#include <iostream>
using namespace std;
class Number
{
int num;
public:
Number()
{
cout<<"Enter number: ";
cin>>num;
}
void display()
{
cout<<num<<' ';
}
friend void Greatest(Number&, Number&,Number&);
};
void Greatest(Number& obj1,Number& obj2,Number& obj3)
{
cout<<"\nGreatest number is: ";
cout<<max(obj1.num,max(obj2.num,obj3.num));
}
int main()
{
Number obj1,obj2,obj3;
Greatest(obj1,obj2,obj3);
return 0;
}
I2luY2x1ZGUgPGlvc3RyZWFtPgp1c2luZyBuYW1lc3BhY2Ugc3RkOwoKY2xhc3MgTnVtYmVyCnsKICAgIGludCBudW07CiAgICBwdWJsaWM6CiAgICBOdW1iZXIoKQogICAgewogICAgICAgIGNvdXQ8PCJFbnRlciBudW1iZXI6ICI7CiAgICAgICAgY2luPj5udW07CiAgICB9CiAgICB2b2lkIGRpc3BsYXkoKQogICAgewogICAgICAgIGNvdXQ8PG51bTw8JyAnOwogICAgfQogICAgZnJpZW5kIHZvaWQgR3JlYXRlc3QoTnVtYmVyJiwgTnVtYmVyJixOdW1iZXImKTsKfTsKCnZvaWQgR3JlYXRlc3QoTnVtYmVyJiBvYmoxLE51bWJlciYgb2JqMixOdW1iZXImIG9iajMpCnsKICAgIGNvdXQ8PCJcbkdyZWF0ZXN0IG51bWJlciBpczogIjsKICAgIGNvdXQ8PG1heChvYmoxLm51bSxtYXgob2JqMi5udW0sb2JqMy5udW0pKTsKfQoKaW50IG1haW4oKQp7CiAgICBOdW1iZXIgb2JqMSxvYmoyLG9iajM7CiAgICBHcmVhdGVzdChvYmoxLG9iajIsb2JqMyk7CgogICAgcmV0dXJuIDA7Cn0K