bndnsuy 发表于 2014-11-23 11:03 
“习题”长的怎么样?
先把你的原始问题描述给人看一下,方便别人了解问题始末。
Write a program that computes the minimum number of bills and coins needed to make change for a person. For instance, if you need to give 34.36 in change you would need one twenty, one ten, four ones, a quarter, a dime, and a penny. You don′t have to compute change for bills greater than 20 dollar bills or for fifty cent pieces. You can solve this problem by doing division, multiplication, subtraction, and converting floats to ints when appropriate. So, when you run the program it should look exactly like this:
How much did the item cost: 65.64
How much did the person give you: 100.00
The person's change is $34.36
The bills or the change should be:
1 twenties
1 tens
0 fives
4 ones
1 quarters
1 dimes
0 nickels
1 pennies