subject
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

ansver
Answers: 3

Another question on Mathematics

question
Mathematics, 21.06.2019 21:10
Hey free points ! people i have a few math questions on my profile consider looking at them i have to get done in 30 mins!
Answers: 1
question
Mathematics, 21.06.2019 23:40
Sanjay solved the equation below. which property did he use to determine that 7x+42=42 is equivalent to 7(x+6)=42 7x+42=42 7x=0 x=0
Answers: 1
question
Mathematics, 22.06.2019 00:50
Identify the statement below as either descriptive or inferential statistics. upper a certain website sold an average of 117 books per day last week. is the statement an example of descriptive or inferential statistics? a. it is an example of descriptive statistics because it uses a sample to make a claim about a population. b. it is an example of inferential statistics because it uses a sample to make a claim about a population. c. it is an example of inferential statistics because it summarizes the information in a sample. d. it is an example of descriptive statistics because it summarizes the information in a sample.
Answers: 1
question
Mathematics, 22.06.2019 02:10
Given: m zade = 60° and m2cdf = (3x + 15) prove: x = 15
Answers: 3
You know the right answer?
John wants to give a total bonus of $851 to his three employees taking fairly as possible into accou...
Questions
question
Spanish, 24.11.2020 20:30
question
Mathematics, 24.11.2020 20:30
question
Mathematics, 24.11.2020 20:30
question
Mathematics, 24.11.2020 20:30