Write a program that prompts users for the amount of pennies

Assignment Help Computer Engineering
Reference no: EM132211300

Question :

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++

Reference no: EM132211300

Questions Cloud

Find the number of words and returns the word count back : Write a program that prompts the user to enter a sentence (not exceeding the size 100) and after passing the sentence to a function.
The historical background of the affordable care act : What is the legislative history of the Affordable Care Act policy? What is the historical background of the Affordable Care Act?
Enter five test scores and then print the average test score : I am having trouble understanding where the 5 values are entered in the program. Enter five test scores and then print the average test score.
Consider the perspective of the customer : Consider the perspective of the customer-what communication strategies would you use in order to reduce fear and anxiety related to the merger for customers?
Write a program that prompts users for the amount of pennies : 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.
What leadership traits-styles-approach-communication tactic : What leadership traits, styles, approach(es), and communication tactic(s) can you associate with each leader/manager you selected?
How does sharing food establish and reproduce socialrelation : The anthropologist Maurice Bloch states, ‘In all societies, sharing food is a wayof establishing closeness, while, conversely, the refusal to share.
Print the value of the integer pointed to by iptr : In fooA(int* iptr), print the value of the integer pointed to by iptr, the address pointed to by iptr, and the address of iptr itself.
Distinguish between the dominant and the demotic discourses : Why is it useful for anthropological analysis to distinguish between the dominant and the demotic discourses of different ethnic groups.

Reviews

Write a Review

Computer Engineering Questions & Answers

  Write a program code using any language

Write a program code using any language. Input the plaintext and check the size. Input the key and check the size

  Make sure that the procedure can return the result

Write a PL/SQL procedure that will compute XY+1. Make sure that the procedure can return the result of the computation .

  What is the spectrum of a signal

What is the spectrum of a signal? What is the bandwidth of a signal? Why would analog data have to be modulated onto an analog signal?

  Draw tree storing k as its keys using maximum number of node

Consider the set of keys K = {1,2,3,4,5,6,7,8,9,10,11,12,13,14,15}. Draw a (2,4) tree storing K as its keys using the maximum number of nodes.

  Discuss what is information security policy

What is information security policy. Why it is critical to the success of the information security program

  Discuss how cryptography has been used for good

Cryptography has a long history, stemming from ancient times until the present day. It has had many uses, from keeping military secrets to helping plan terroris

  Questionproblem 1execute following boolean functions with

questionproblem 1execute following boolean functions with the appropriate multiplexer and external gatesf1 sum

  How much compromise is made in the aggressive mode

Compare the revised public-key methods in the main and aggressive modes. How much compromise is made in the aggressive mode with respect to security?

  Create the context diagram for the system just described

Create the context diagram for the system just described. Create the DFD fragments for each of the four use cases outlined in part a, and then combine them into the level 0 DFD.

  How would you specify the conversion time and aperture time

An A/D convener is to be specified for the following measurement: the signal will not vary during the conversion time: the signal range is 0 to 10 V.

  Develop your introductory remarks to the teams

Develop your introductory remarks to the teams, including five main points of risk assessment and five main points of incident response.

  What is the set of all possible values for the check digit y

What is the set of all possible values for the check digit Y? For more details about the zones defined in the US, you may refer to your lectures.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd