Answered step by step
Verified Expert Solution
Question
1 Approved Answer
must be in cpp. thank you. Write a program that prompts the user to input a number of quarters, dimes, and nickels. The program then
must be in cpp. thank you.
Write a program that prompts the user to input a number of quarters, dimes, and nickels. The program then outputs the total value of the coins in pennies. .Documentation (up to -2 and noted why). Should have a block at the top with their name, date, help given/received, etc. Should also have inline documentation explaining code. Should have constants for PENNIES_PER_QTR, PENNIES PER_DIME, and PENNIES_PER_NICKEL (-2 no constants at all). Names are arbitrary, but should be relevant to the content Not declaring constants above main (2) Should provide clear prompts asking the user to enter the number of quarters, nickels, and dimes. This may be one prompt or 3 individual prompts (-2 if not clear on what the user should and in all caps (-1 if not in all caps) .Need variables declared of type int for quarters, nickels, dimes, and total_pennies- appropriately named (-2 if not) do) Calculation should take the inputs and multiply them by the constants Output should include the total number pennies needed (may re-echo qtr, nickels, and dimes too) (-3 if missing) Up to 5 points will be deducted for messy, odd, inefficient coding practices. If so, it will be noted why .Incorrect output (5) TEST: 5 quarters, 4 dimes, 3 nickels. Output is 180 penniesStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started