Answered step by step
Verified Expert Solution
Link Copied!

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.

image text in transcribed

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 pennies

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

PC Magazine Guide To Client Server Databases

Authors: Joe Salemi

1st Edition

156276070X, 978-1562760700

More Books

Students also viewed these Databases questions

Question

=+2 How does the preparation and support for each type of IE vary?

Answered: 1 week ago

Question

=+What is the extent of the use of each type of IE?

Answered: 1 week ago