subject

In r In this question you will create a simplified cash register.
Use the runif function to generate a float (i. e. with or without the decimal) random number between 1
and 90 (let's call this amount). A customer owes this amount, show the amount to the user. Take the input
from the keyboard for the customer to pay this amount.
Customer will hand you (input) some money in an integer denomination greater than the amount. For
example, if the amount is $44.37, the customer hands you 50 or 60 or 70 greater (up to 100). If the amount
given is the exact amount, then you should tell them that no change is owed. Otherwise, you should
calculate the number of each denomination to give them back in their change. The denominations
available are dollars (1.00), quarters (0.25), dimes (0.10), and nickels (0.05). A penny should be rounded
up to the nearest nickel. Once you have calculated the change you should tell the customer how much
change you have given them.
In order to keep your customer happy, you should always give them the fewest coins possible, do not
simply give them back all their change in nickels. You are expected to use meaningful variable names
and comment any code you feel requires explanation.
Example case:
Random Amount - $44.39
User Gives (keyboard input) - $60
Change = 60 - 44.37 = $15.61
Fewest denomination change is: 15 Dollars, 2 Quarters, 1 Dime, 1 Nickel (the 1 cent is rounded up to
a nickel)
I

ansver
Answers: 3

Other questions on the subject: Computers and Technology

image
Computers and Technology, 21.06.2019 19:30, sandersmakaylaovq5vu
Raveena is making a professional presentation for a newly launched product of her company. she wants to incorporate the following features in her presentation. a) to add serial numbers in each slide b) to add name of her company on top of each slide. c) to add the picture of her product on the second slide(the picture of her product is stored on her computer) write the commands/features of her presentation tool using which she can perform the above operations.
Answers: 2
image
Computers and Technology, 22.06.2019 20:00, BreadOfTheBear
What statement best describes operating systems? it’s possible for modern computers to function without operating systems. most operating systems are free or very inexpensive. operating systems are managed by the computer’s microprocessor (cpu). operating systems manage the computer’s random access memory (ram).
Answers: 1
image
Computers and Technology, 22.06.2019 22:40, ihatemylife0
Least square fit to polynomial write a function leastsquarefit3pol that solves a linear system of equations to find a least squares fit of a third order polynomial to an experimental data set given as two row arrays. the function leastsquarefit3pol must explicitly solve a set of linear equations and cannot use polyfit. there should be no restriction on the size of the problem that can be solved.
Answers: 1
image
Computers and Technology, 24.06.2019 15:40, elgallo5399
In the above figure, what type of cylinder arrangement is shown in the figure above? a. l-type b. v-type c. in-line d. horizontal pls make sure its right if its rong im grounded for 3months
Answers: 1
You know the right answer?
In r In this question you will create a simplified cash register.
Use the runif function to g...

Questions in other subjects: