Okay, our programming teacher gave an exercise for us, the output should be like this
https://www.dropbox.com/s/t70zui2xvnyj7sb/CS126%20Major%20Exercise%203%20%28October%2031%29.pdf
I have already found out how to find the number of thousands and five hundreds, but I can't formulate the number of two hundreds, and cannot continue to the other parts.
here is my work so far
//Change Breakdown
int wholePart;
double centsPart;
int thousands, fiveHundreds, twoHundreds, oneHundreds, fifties, twenties, tens, fives, ones;
int dotTwentyFives, dotTens, dotZeroFives;
//Computations
wholePart = (int) change;
centsPart = change - wholePart;
thousands = wholePart / 1000;
tHundreds = wholePart /
fiveHundreds = (wholePart - (thousands * 1000)) / 500;
cout<<"\n\n========================Change Breakdown=======================\n\n";
cout<<"1000 "<<thousands<<" "<<thousands*1000.00<<"\n";
cout<<"500 "<<fiveHundreds<<" "<<fiveHundreds*500.00<<"\n";