#include <iostream>

struct Double
{
	int characteristic;
	char decimal;
	int mantissa;
	
	friend std::ostream &operator <<(std::ostream &stm, Double const &rhs)
	{
		return stm << rhs.characteristic << rhs.decimal << rhs.mantissa;
	}
	
	friend std::istream &operator >>(std::istream &stm, Double &rhs)
	{
		return stm >> rhs.characteristic >> rhs.decimal >> rhs.mantissa;
	}
	
	Double operator-(Double const &rhs) const
	{
		Double result = *this;
		if(rhs.mantissa > result.mantissa)
		{
			--result.characteristic;
			result.mantissa += 100;
		}
		
		result.characteristic -= rhs.characteristic;
		result.mantissa -= rhs.mantissa;
		
		return result;
	}
};

int main()
{
	Double itemCost;
	std::cout << "Please enter the item cost: ";
	std::cin >> itemCost;
	
	Double amountPaid;
	std::cout << "Please enter the amount paid: ";
	std::cin >> amountPaid;
	
	Double change = amountPaid - itemCost;
	std::cout << "Change due $" << change << std::endl;
	//now you can get the exact change easy
	
	return 0;
}