Hi Everyone -

This is my first post here, and I made sure to use the search utility before posting this.

Today, we were given our first programming assignement on the first day of class. The class is intro to programming, and we are using the C++ language which apparently is the best out there.

Well, we were given a program to count coins and from the limited knowledge I have with C++ ( I never progammed before until today ) I am doing everything correctly except for where I am computing the value of my coins.

Could anyone give me a clue on...
1) what I am doing wrong?
2) and how to convert my total value of money into a dollar amount such as if I had 8 quarterrs and 12 pennies it would display $2.12

Thanks for any assistance provided.


Code:
#include <iostream>
using namespace std;


int main()
{
	// used int data type because you can never have a fraction of a coin , ideally
	int quarters, dimes, nickles, pennies;
	quarters = dimes = nickles = pennies = 0;


	cout << "Enter the number of quarters:";
	cin  >> quarters;
	cout << "Enter the number of dimes   :";
	cin  >> dimes   ;
	cout << "Enter the number of nickles :";
	cin  >> nickles ;
	cout << "Enter the number of pennies :";
	cin  >> pennies ;


	cout << quarters << " " << dimes << " " << nickles << " " << pennies << " " << endl << endl << endl << endl;

	float money = 0.0 // amount of money i have
	money = (quarters * .25) + (dimes * .10) + (nickles * .5) + (pennies * .1);

    cout << "you have this amount        :" << money << endl;

	return 0;
}