Exercises
August 25 - August 28, 2006
- Problem PP2.9 - Write an application that prompts for and reads a
double value representing a monetary amount. Then determine the fewest
number of each bill and coin needed to represent that amount, starting
with the highest (assume that a ten dollar bill is the maximum size needed).
For example, if the value entered is 47.63, then the program should print
the equivalent amount as: 4 tens, 1 five, 2 ones, 2 quarters, 1dime,
0 nickels, 3 pennies
Write your algorithm first!
- Write an application that prompts the user for an integer representing
a number of rows and prints the following pattern:
*****
****
***
**
*
Sami Rollins