Site hosted by Angelfire.com: Build your free website today!
#include #include
int main()
{
	double United_States[10] = {264.32, 264.11, 264.03, 263.39, 262.79, 262.65, 262.04, 262.38, 261.87, 261.93};
	double Japan[10] = {24.23, 24.23, 24.23, 24.23, 24.23, 24.23, 24.23, 24.23, 24.23, 24.23};
	double Germany[10] = {95.18, 95.18, 95.18, 95.18, 95.18, 95.18, 95.18, 95.18, 95.18, 95.18};
	double United_Kingdom[10] = {18.84, 19.03, 19.01, 19.01, 19.03, 19.03, 19.01, 19.01, 19.00, 18.99};
	int index;
	cout << setprecision(2);
	cout.setf(ios::showpoint);
	cout.setf(ios::fixed);
	cout << "              US       Japan    Germany      UK\n";
	for(index = 0; index <= 9; index++)
	{
		cout << "   " << 1980 + index << ":" << setw(10) << United_States[index] << setw(10) << Japan[index] << setw(10) << Germany[index] << setw(10) << United_Kingdom[index] << '\n';
	}
	cout << "\nGold Changes:\n";
	cout << "                     US      Japan     Germany     UK\n";

	for(index = 0; index < 9; index++)
	{
		cout << "   " << 1980 + index << " - " << 1980 + index + 1 << setw(10) << (United_States[index] - United_States[index + 1]) * -1 << setw(10) << (Japan[index] - Japan[index + 1]) * -1 << setw(10) << (Germany[index] - Germany[index + 1]) * -1 << setw(10) << (United_Kingdom[index] - United_Kingdom[index + 1]) * -1 << endl;
	}
	return 0;
}