I'm currently studying C++ and i have this lab i need the answer to it. Write a program that asks the user to enter a number of quarters, dimes, nickels and pennies and then outputs the monetary value of the coins in the format of dollars and remaining cents. Your program should interact with the user exactly as it shows in the following example: Please enter the number of coins: # of quarters: 20 # of dimes: 4 # of nickels: 13 # of pennies: 17 The total is 6 dollars and 22 cents

Microsoft Visual C#
7th Edition
ISBN:9781337102100
Author:Joyce, Farrell.
Publisher:Joyce, Farrell.
Chapter2: Using Data
Section: Chapter Questions
Problem 4E: In this chapter, you learned that although a double and a decimal both hold floating-point numbers,...
icon
Related questions
Question

I'm currently studying C++ and i have this lab i need the answer to it.

Write a program that asks the user to enter a number of quarters, dimes, nickels and pennies and then outputs the monetary value of the coins in the format of dollars and remaining cents.


Your program should interact with the user exactly as it shows in the following example:

Please enter the number of coins:
# of quarters: 20
# of dimes: 4
# of nickels: 13
# of pennies: 17
The total is 6 dollars and 22 cents

Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 3 steps with 2 images

Blurred answer
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
Microsoft Visual C#
Microsoft Visual C#
Computer Science
ISBN:
9781337102100
Author:
Joyce, Farrell.
Publisher:
Cengage Learning,