Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Write a program that prompts users (in main) for the amount of pennies they have. Use 2 value returning functions to convert the number of
Write a program that prompts users (in main) for the amount of pennies they have. Use 2 value returning functions to convert the number of pennies 1)into dollars and 2) into cents. Use cin to get the input from the keyboard. Then use division to get the dollars and use modulus to get the amount of cents. USE ONLY INTEGERS IN THIS PROGRAM.
Use the algorithm below: (be sure to use these as comments in your program)
1. Prompt the user to enter a number of cents. 2. Get the number of cents from the user. 3. Convert the number of cents into dollars and cents. 4. Output the conversion to the user in the currency format, e.g. $230.59
code must be done in c++
Step 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