#include<iostream>
#include<iomanip>
using namespace std;

int main()
{
	int halfs, qu, di, nick, penn, change, value;
	float dollars;
	cout << "Your change will be computed."<<endl;
	cout << "Enter how many half dollars: ";
	cin >> halfs;
	cout << "Enter how many quarters: ";
	cin >> qu;
	cout << "Enter how many dimes: ";
	cin >> di;
	cout << "Enter how many nickles: ";
	cin >> nick;
	cout << "Enter how many pennies: ";
	cin >> penn;
	cout << "You entered:" << endl;
	cout << "\t\t"<< halfs << " half dollars"<< endl;
	cout << "\t\t"<< qu << " quarters" << endl;
	cout << "\t\t"<< di << " dimes" << endl;
	cout << "\t\t"<< nick << " nickles" << endl;
	cout << "\t\t"<< penn << " pennies" << endl << endl;
	value = halfs * 50 + qu * 25 + di * 10 + nick * 5 + penn;
	dollars = value/100.0;
	cout << "The value of your " << halfs+qu+di+nick+penn << " coins is equivalent to " << value << " pennies." << endl;
	cout << "The value or your "  << halfs+qu+di+nick+penn << " coins is $" << fixed << setprecision(2) << dollars << endl<<endl;
	
	cout << fixed << setprecision(2) << "US$" << dollars << " is equal to " << dollars*103.8500 << " Yen, "<< dollars*0.7669 << " Euro and CAN$" << dollars*1.2371 <<"."<<endl;
	// LOTS OF COUTS!!!
	cout << "Enter a number of cents below 100 but greater than 0: ";
	cin >> halfs;
	cout << "This amount of change will require:" << endl;
	cout << halfs/50 << " half dollars" << endl;
	qu =  halfs % 50 ;
	cout << qu/25 << " quarters" << endl;
	di =  qu % 25 ;
	cout << di/10 << " dimes" << endl;
	nick = qu % 10;
	cout << nick/5 << " nickels" << endl;
	penn = nick % 5 ;
	cout << penn << " pennies" << endl;
}
