// class templates
#include <iostream>
using namespace std;
template <class TEMP>
class Numbers {
	TEMP a, b;
public:
	Numbers(TEMP num1, TEMP num2)
	{
		a = num1; b = num2;
	}
	TEMP GetMax();
};

template <class TEMP>
TEMP Numbers<TEMP>::GetMax()
{
	TEMP retval;
	retval = a > b ? a : b;
	return retval;
}
int main() 
{
	int i, j;
	float f1, f2;
	cout << "Enter 2 integer Numbers : ";
	cin >> i >> j;
	Numbers <int> intNumsObj(i, j);
	cout << endl << "Max of 2 numbers is " << intNumsObj.GetMax() << endl;


	cout << "Enter 2 float Numbers : ";
	cin >> f1 >> f2;
	Numbers <float> floatNumsObj(f1, f2);
	cout << endl << "Max of 2 numbers is " << floatNumsObj.GetMax();
	return 0;
}

