Question: 4. Write a program called Lab2C that will a. Declare the following double variables: quarters, dimes, nickels, pennies and total b. Ask the user to
4. Write a program called Lab2C that will a. Declare the following double variables: quarters, dimes, nickels, pennies and total b. Ask the user to input values for quarters, dimes, nickels & pennies. (Each variable holds a count of how many of that type of coin the user has.) C. Multiply each variable by the appropriate amount for its type and add them together to calculate the total value of the coins. Set total equal to that value. (Hint - if you had a certain number of quarters in your hand, what would you multiply that number by to get the value in dollars and cents.) d. Print total with a label
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
