Mathematics, 12.03.2021 20:30 christiannpettyy
John wants to give a total bonus of $851 to his three employees taking fairly as possible into account their number of days of absence during the period under consideration. Employee A was absent 18 days, B 15 days, and C 12 days.
The more absences, the lower the bonus ...
How much should each employee receive? John thinks A should receive $230, B $276, C $345 since 230 * 18 = 276 * 15 = 345 * 12 and 230 + 276 + 345 = 851.
Task:
Given an array arr (numbers of days of absence for each employee) and a number s (total bonus) the function bonus(arr, s) will follow John's way and return an array of the fair bonuses of all employees in the same order as their numbers of days of absences.
s and all elements of arr are positive integers.
Examples:
bonus([18, 15, 12], 851) -> [230, 276, 345]
bonus([30, 27, 8, 14, 7], 34067) -> [2772, 3080, 10395, 5940, 11880]
Notes
Answers: 3
Mathematics, 21.06.2019 17:00
Asocial networking site currently has 400,000 active members, and that figure is predicted to increase by 32% each year. the following expression represents the number of active members on the site after t years.
Answers: 1
Mathematics, 21.06.2019 18:00
On saturday a souvenir shop had 125 customers.sixty four percent of the costumers paid with a credit card. how many costumers paid with cash?
Answers: 1
Mathematics, 21.06.2019 19:00
Solve the problem. a student earned grades of c, a, b, and a in four different courses. those courses had these corresponding numbers of credit hours: 4, 5, 1, and 5. the grading system assigns quality points to letter grades as follows: a = 4, b = 3, c = 2, d = 1, and f = 0. compute the grade point average (gpa) and round the result to two decimal places. 3.40 3.50 8.75 2.18
Answers: 1
Mathematics, 22.06.2019 00:00
Cd is the perpendicular bisector of both xy and st, and cy=20. find xy.
Answers: 1
John wants to give a total bonus of $851 to his three employees taking fairly as possible into accou...
Mathematics, 26.01.2020 03:31
History, 26.01.2020 03:31
Computers and Technology, 26.01.2020 04:31
Mathematics, 26.01.2020 04:31
Mathematics, 26.01.2020 04:31