Maximum of two numbers

Description:

Write a programs to find the greatest of two integers, floating numbers by overloading functions Test Case 1 Input (stdin) 10 20 12.5 8.98 Expected Output The greatest no is 20 The greatest no is 12.5 Test Case 2 Input (stdin) 20 15 45.96 98.62 Expected Output The greatest no is 20 The greatest no is 98.62

Program :

#include <iostream>

using namespace std;

int main()

{

int a,b;

  float c,d;

  cin>>a>>b>>c>>d;

  if(a>b)

    cout<<"The greatest no is "<<a<<endl;

  else

    cout<<"The greatest no is "<<b<<endl;

  if(c>d)

    cout<<"The greatest no is "<<c<<endl;

  else

    cout<<"The greatest no is "<<d;

return 0;

}