Find greater number with Inline function - C++

Q. Write a C++ program using class to find the greater one of two integer numbers using Inline function, conditional operator and default argument.

Answer:

#include<iostream>
using namespace std;

class MaxNum
{
    public:
        inline int maximum_number(int no1, int no2)
        {
                return no1>no2?no1:no2;
        }
};
int main()
{
        int num1, num2;
        MaxNum mn;
        cout<<"\n Enter First Number   :   ";
        cin>>num1;
        cout<<"\n Enter Second Number  :   ";
        cin>>num2;
        cout<<"\n --------------------------------";
        cout<<"\n First Number         :   "<<num1<<endl;
        cout<<"\n Second Number        :   "<<num2<<endl;
        cout<<"\n --------------------------------";
        cout<<"\n Larger Number is    :   "<<mn.maximum_number(num1, num2)<<endl;
        return 0;
}


Output:

max num conditional operator using inline