621 views
0 votes
design an algorithm and write a program that prompts the user for a certain number of quarters, dimes, nickels, and pennies and then converts the total value into pennies.

1 Answer

4 votes
Algorithm:
1. Prompt the user to enter the number of quarters, dimes, nickels, and pennies.
2. Read the input values and store them in separate variables.
3. Calculate the total value in pennies by multiplying the number of each coin by its value in pennies and adding them all together.
4. Display the total value in pennies.
User Cherona
by
7.2k points