Computer Science, asked by sunerisulthana17731, 8 months ago

Write a program that helps the user to add up the coins in their piggy bank. The program should ask:
"How many 5c coins", "How many 10c coins", "How many 20c coins" etc. Then it should give the total value of the piggy bank in dollars.

Answers

Answered by akashkumar02042001
0

Answer:

Now we add the values for each denomination to find the total amount of money in the piggy bank ; 22 + 25 + 50 + 200 = 297. So the total value of the coins in the piggy bank is 297 cents or 2 dollars and 97 cents.

...

Solution.

denomination number of coins value of coins in cents

quarter 8 8 \times 25 = 20

Similar questions