Math, asked by Ishika2503, 1 year ago

Calculate the average salary for all employees in c

Answers

Answered by jacky09
0
This solution has a limitation that information is partially passed and there needs some trust level.

Salary of A: i

Salary of B: j

Salary of C: k

Salary of D: l

A passes to B (i + a) where a is a number that A knows B takes this a passes to C (i + j + a + b). C takes this and passes to D (i + j + k + a + b + c). D takes this and passes to A (i + j + k + l + a + b + c + d)

Now one after another they remove their constants.
Ex: A now passes to B: i + j + k + l + b + c + d (He has removed a)

B passes to C after removing of his constant (b).

Thus Finally D gets x + y + z + u + d. He takes away his constant and now he has i + j + k + l.

So the average is:(i + j + k + l) / 4
Similar questions