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 20:00
What is the term for water wave that is created by an underwater earthquake
Answers: 1
question
Computers and Technology, 23.06.2019 17:00
1. which of the following is not an example of an objective question? a. multiple choice. b. essay. c. true/false. d. matching 2. why is it important to recognize the key word in the essay question? a. it will provide the answer to the essay. b. it will show you a friend's answer. c. it will provide you time to look for the answer. d. it will guide you on which kind of answer is required.
Answers: 1
question
Computers and Technology, 24.06.2019 13:30
Write a program that uses a two-dimensional array to store the highest and lowest temperatures for each month of the year. the program should output the average high, average low, and the highest and lowest temper- atures for the year. your program must consist of the following functions: a. function getdata: this function reads and stores data in the two- dimensional array. b. function averagehigh: this function calculates and returns the average high temperature for the year. c. function averagelow: this function calculates and returns the aver- age low temperature for the year. d. function indexhightemp: this function returns the index of the highest high temperature in the array. e. function indexlowtemp: this function retur
Answers: 3
question
Computers and Technology, 24.06.2019 20:50
Which key function of a business involves finding, targeting, attracting, and connecting with the right customers?
Answers: 3
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
Chemistry, 29.09.2019 19:30
question
Chemistry, 29.09.2019 19:30