Answered step by step
Verified Expert Solution
Link Copied!

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

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

Oracle Solaris 11.2 System Administration (oracle Press)

Authors: Harry Foxwell

1st Edition

007184421X, 9780071844215

More Books

Students also viewed these Databases questions

Question

=+10. How is the audience likely to respond to this message?

Answered: 1 week ago