#include <iostream>
using namespace std;

template <class TEMP>
class Calculator
{
private:
	TEMP num1, num2;

public:
	Calculator(TEMP n1, TEMP n2)
	{
		num1 = n1;
		num2 = n2;
	}

	void DisplayResult()
	{
		cout << "Numbers are: "	<< num1 << " , " << num2 << "." << endl;
		cout << "Addition is: "		<< Add()  << endl;
		cout << "Subtraction is: "	<< Subtract() << endl;
		cout << "Product is: "		<< Multiply() << endl;
		cout << "Division is: "		<< Divide()	  << endl;
	}

	TEMP Add()	   { return num1 + num2; }
	TEMP Subtract()  { return num1 - num2; }
	TEMP Multiply() { return num1 * num2; }
	TEMP Divide()	   { return num1 / num2; }
};

int main()
{
	int i1, i2;
	float f1, f2;

	cout << "Enter 2 integer Numbers : ";
	cin >> i1 >> i2;
	
	cout << "Enter 2 float Numbers : ";
	cin >> f1 >> f2;

	Calculator<int> intCalculator(i1, i2);
	Calculator<float> floatCalculator(f1, f2);

	cout << "Int results:" << endl;
	intCalculator.DisplayResult();

	cout << endl << "Float results:" << endl;
	floatCalculator.DisplayResult();

	return 0;
}

