A program to simulate a cash register change calculator

Assignment Help Basic Computer Science
Reference no: EM13849215

Write a program to simulate a cash register change calculator. Assume that you have two double variables that have been declared and initialized with some values: cost and amtPaid. Assume that amtPaid is greater than or equal to cost. 

cost represents the amount that the customer owes to the store, and amtPaid is the amount that the customer is giving to the store. Your program should calculate and print the total change due, and print how to give back the change.

For example, if cost is $52.32, and the amtPaid is $100, your program should print:Your change is $47.682 $20 bill(s)1 $5 bill(s)2 $1 bill(s)2 Quarter(s)1 Dime(s)1 Nickel(s)3 Penny(ies)You don't have to use dollar amounts greater than $20 in giving back your change. Your code should not print anything for a change amount that is not used; for example, do not print "0 $10 bill(s)" in the example shown above.(Recall that 47.68 - (int)47.68 would be 0.68.)

 

 

Reference no: EM13849215

Questions Cloud

Long-term debt financing-new long-term debt : At year-end 2015, Wallace Landscaping’s total assets were $1.9 million and its accounts payable were $440,000. Sales, which in 2015 were $2.7 million, are expected to increase by 30% in 2016. Total assets and accounts payable are proportional to sale..
Develop an action plan identifying key tasksand : Develop an action plan identifying key tasksand / or processes involved in changing from Windows 7 to Windows 10 and how they will change
Management prefers to get the server with the os : Management prefers to get the server with the OS already installed and wants to keep management tasks as simple as possible. which windows server 2012/r2 edition do you recommend? explain your answer please ?
A firm wishes to maintain an internal growth rate : A firm wishes to maintain an internal growth rate of 9 percent and a dividend payout ratio of 25 percent. The current profit margin is 9 percent, and the firm uses no external financing sources. What must total asset turnover be? Round your answer to..
A program to simulate a cash register change calculator : Write a program to simulate a cash register change calculator. Assume that you have two double variables that have been declared and initialized with some values: cost and amtPaid. Assume that amtPaid is greater than or equal to cost.
Desires sustainable growth rate : Boyd Crowder's Chowder, Inc. desires a sustainable growth rate of 3.8 percent while maintaining a 49 percent dividend payout ratio and a 4.9 percent profit margin. The company has a capital intensity ratio of 1.21. What equity multiplier is required ..
About australian exchange rate : Using Demand and Supply model of exchange rate determination briefly explain how AUD is determined in the forex market, and what factors influence its fluctuations.
Assume the company maintains its current operating capacity : Lloyd and Harry Limo Service, Co. is currently operating at 92% of fixed asset capacity. Fixed assets on the balance sheet are $593,000. Current sales are $640,000, and are projected to grow to $792,000. How many in new fixed assets are required to s..
What was total long-term debt and total liabilities : At year-end 2015, Wallace Landscaping’s total assets were $1.9 million and its accounts payable were $390,000. Sales, which in 2015 were $2.1 million, are expected to increase by 20% in 2016. What was Wallace's total long-term debt in 2015? How much ..

Reviews

knj849215

10/6/2016 5:21:49 PM

This is a programing assignment and i m new to this so i need expert help which i think you may do so. Please check the requirements and let me know how much it should be. I have enough time to complete it.

Write a Review

Basic Computer Science Questions & Answers

  Identifies the cost of computer

identifies the cost of computer components to configure a computer system (including all peripheral devices where needed) for use in one of the following four situations:

  Input devices

Compare how the gestures data is generated and represented for interpretation in each of the following input devices. In your comparison, consider the data formats (radio waves, electrical signal, sound, etc.), device drivers, operating systems suppo..

  Cores on computer systems

Assignment : Cores on Computer Systems:  Differentiate between multiprocessor systems and many-core systems in terms of power efficiency, cost benefit analysis, instructions processing efficiency, and packaging form factors.

  Prepare an annual budget in an excel spreadsheet

Prepare working solutions in Excel that will manage the annual budget

  Write a research paper in relation to a software design

Research paper in relation to a Software Design related topic

  Describe the forest, domain, ou, and trust configuration

Describe the forest, domain, OU, and trust configuration for Bluesky. Include a chart or diagram of the current configuration. Currently Bluesky has a single domain and default OU structure.

  Construct a truth table for the boolean expression

Construct a truth table for the Boolean expressions ABC + A'B'C' ABC + AB'C' + A'B'C' A(BC' + B'C)

  Evaluate the cost of materials

Evaluate the cost of materials

  The marie simulator

Depending on how comfortable you are with using the MARIE simulator after reading

  What is the main advantage of using master pages

What is the main advantage of using master pages. Explain the purpose and advantage of using styles.

  Describe the three fundamental models of distributed systems

Explain the two approaches to packet delivery by the network layer in Distributed Systems. Describe the three fundamental models of Distributed Systems

  Distinguish between caching and buffering

Distinguish between caching and buffering The failure model defines the ways in which failure may occur in order to provide an understanding of the effects of failure. Give one type of failure with a brief description of the failure

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