Ask Question, Ask an Expert

+61-413 786 465

info@mywordsolution.com

Ask Computer Engineering Expert

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.)

 

 

Computer Engineering, Engineering

  • Category:- Computer Engineering
  • Reference No.:- M91418995
  • Price:- $20

Guranteed 24 Hours Delivery, In Price:- $20

Have any Question?


Related Questions in Computer Engineering

Could you help me to solve the following stats problemthe

Could you help me to solve the following stats problem? The number of patients waiting for flu vaccine at A hospital has the following probability distributions. x 1 2 3 4 p(x) 0.2 0.3 0.4 0.1 What is the variance of num ...

Question skyeducation will develop a new branch in the city

Question : SkyEducation will develop a new branch in the city for J2EE programming training. The information is given in the following table. (Ignore the crashing parameters.) Task a b c d e f g Predecessors - - - a b c ...

How do you calculate the number of peaks and mass when

How do you calculate the number of peaks and mass when Bromine with two isotopes and phosphate with one isotope are put through a mass spectrometer? The formula is PBr3

Question when you supervisor arrives she has a document

Question : When you supervisor arrives, she has a document with her for you to sign, indicating the condition of the computer, how you kept it secure while you waited for her, and the transfer of responsibility for the c ...

Assignment - proposal literature review research method1

Assignment - Proposal, Literature Review, Research Method 1. Abstract - Summary of the knowledge gap: problems of the existing research - Aim of the research, summary of what this project is to achieve - Summary of the a ...

Systems analysis project personal trainer inc owns and

Systems analysis project Personal Trainer, Inc. owns and operates fitness centers in a dozen Midwestern cities. The centers have done well, and the company is planning an international expansion by opening a new "superce ...

A survey is taken of people in the class of favorite flavor

A survey is taken of people in the class of favorite flavor of ice cream among a forced choice of chocolate, vanilla, or strawberry. 70% prefer chocolate, 20% prefer vanilla, and 10% prefer strawberry. a) What is the ent ...

Question critical infrastructures -1discuss cybersecurity

Question: Critical Infrastructures - 1. Discuss cybersecurity policy issues affecting SCADA and ICS systems for Critical Infrastructure services for the public, and compare those issues to the policy issues that affect t ...

Describe a ping of death attack as an attack that causes

Describe a ping of death attack as an attack that causes the victim computer to freeze and malfunction.

Question 1conduct research to determine three types of

Question: 1. Conduct research to determine three types of computer crime. Please provide a detailed description for all crimes, and share an example of where an organization was impacted by each of the types. 2. Elaborat ...

  • 4,153,160 Questions Asked
  • 13,132 Experts
  • 2,558,936 Questions Answered

Ask Experts for help!!

Looking for Assignment Help?

Start excelling in your Courses, Get help with Assignment

Write us your full requirement for evaluation and you will receive response within 20 minutes turnaround time.

Ask Now Help with Problems, Get a Best Answer

Why might a bank avoid the use of interest rate swaps even

Why might a bank avoid the use of interest rate swaps, even when the institution is exposed to significant interest rate

Describe the difference between zero coupon bonds and

Describe the difference between zero coupon bonds and coupon bonds. Under what conditions will a coupon bond sell at a p

Compute the present value of an annuity of 880 per year

Compute the present value of an annuity of $ 880 per year for 16 years, given a discount rate of 6 percent per annum. As

Compute the present value of an 1150 payment made in ten

Compute the present value of an $1,150 payment made in ten years when the discount rate is 12 percent. (Do not round int

Compute the present value of an annuity of 699 per year

Compute the present value of an annuity of $ 699 per year for 19 years, given a discount rate of 6 percent per annum. As