Reference no: EM133714022
Assignment
Write a program that has the main menu. It should be in a while loop that repeats until the user selects 6 to Exit.
Calculating value of coins - Ask the user how many pennies, nickels, dimes, and quarters they have. Output the dollar value of the coins.
Also, output various comments about the dollar value of the coins. For example:
Dollar Value
|
Output
|
< $0.50
|
You need to search for some pennies.
|
>= $0.50 and < $2.00
|
You can barely buy a soda.
|
>= $2.00 and < $5.00
|
You can eat at McDonald'sl
|
>= $5
|
All those coins must be heavy.
|
The user would like to exchange their coins so that they will have the same amount of money, but with the fewest possible coins. Tell the user the fewest coins that will add up to the same dollar amount.
Print for loop patterns - Use for loops to print the following patterns:
Pattern I: use a single for loop to print every 5th number from 105 - 500. There should be 20 numbers per line.
Pattern II: use a nested for loop to print asterisks with 1 on the first line, 2 on the second line, ... 10 on the tenth line.
Pattern III: use a nested for loop to print dollar signs with 10 on the first line, 9 on the second line, ... 1 on the last line.