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

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 10:20
Shown below is the start of a coding region within the fist exon of a gene. 5'--3' 3'--5' how many cas9 pam sequences are present?
Answers: 1
question
Computers and Technology, 24.06.2019 05:30
If you combine two cells into one, what action are you performing? a.  adding a new row or column      b.  splitting the cells      c.  removing a new row or column      d.  merging the cells
Answers: 2
question
Computers and Technology, 24.06.2019 08:30
Why might you choose to create a functional resume
Answers: 1
question
Computers and Technology, 24.06.2019 11:00
Under the home tab, where can a user find options to change the bullet style of an outline? in the slides group in the font group in the paragraph group in the drawing group
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
question
English, 02.10.2020 14:01
question
Biology, 02.10.2020 14:01
question
Mathematics, 02.10.2020 14:01
question
Mathematics, 02.10.2020 14:01
question
Mathematics, 02.10.2020 14:01
Questions on the website: 13722367