Minimum of two numbers

Description:

Write a program to find the maximum of two numbers of type integer and float using function overloading. Input: First line contains two integers. Second line contains two float values. Test Case 1 Input (stdin) 1 2 3.4 5.6 Expected Output The minimum of the integer variable is 1 The minimum of the float variable is 3.4 Test Case 2 Input (stdin) 0 8 6.3 10.4 Expected Output The minimum of the integer variable is 0 The minimum of the float variable is 6.3

Program :

#include <iostream>

using namespace std;

int main()

{

   int a,b;

  float c,d;

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

  if(a>b)

    cout<<"The minimum of the integer variable is "<<b;

  else

    cout<<"\nThe minimum of the integer variable is "<<a;

  if(c<d)

    cout<<"\nThe minimum of the float variable is "<<c;

  else

    cout<<"\nThe minimum of the float variable is "<<d;


return 0;

}