Write a program that helps the user count his change. The program should ask how many quarters the user has, then how many dimes, then how many nickels, then how many pennies. Then the program should tell the user how much money he has, expressed in dollars. Since one quarter is worth 0.25 dollars, a dime is worth 0.10 dollars, a nickel is 0.05 dollars, and a penny is 0.01 dollars.

C++ Programming: From Problem Analysis to Program Design
8th Edition
ISBN:9781337102087
Author:D. S. Malik
Publisher:D. S. Malik
Chapter8: Arrays And Strings
Section: Chapter Questions
Problem 10PE
icon
Related questions
Question
100%
How to solve this problem in java language?
CSC1250L
Exam 1
Summer 2020-2021
Question1 (50 pts)
Write a program that helps the user count his change. The program should ask how many
quarters the user has, then how many dimes, then how many nickels, then how many pennies.
Then the program should tell the user how much money he has, expressed in dollars.
Since one quarter is worth 0.25 dollars, a dime is worth 0.10 dollars, a nickel is 0.05 dollars, and
a penny is 0.01 dollars.
Sample run:
Enter the number of quarters: 5
Enter the number of dimes: 5
Enter the number of nickels: 5
Enter the number of pennies: 5
You have $2.05
Page 2 of 2
Transcribed Image Text:CSC1250L Exam 1 Summer 2020-2021 Question1 (50 pts) Write a program that helps the user count his change. The program should ask how many quarters the user has, then how many dimes, then how many nickels, then how many pennies. Then the program should tell the user how much money he has, expressed in dollars. Since one quarter is worth 0.25 dollars, a dime is worth 0.10 dollars, a nickel is 0.05 dollars, and a penny is 0.01 dollars. Sample run: Enter the number of quarters: 5 Enter the number of dimes: 5 Enter the number of nickels: 5 Enter the number of pennies: 5 You have $2.05 Page 2 of 2
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 2 steps with 1 images

Blurred answer
Knowledge Booster
Multithreading Methods
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
C++ Programming: From Problem Analysis to Program…
C++ Programming: From Problem Analysis to Program…
Computer Science
ISBN:
9781337102087
Author:
D. S. Malik
Publisher:
Cengage Learning