All about flooble | fun stuff | Get a free chatterbox | Free JavaScript | Avatars
 perplexus dot info

 Finding Average (Posted on 2013-04-01)
Three coworkers would like to know their average salary. However, they are self-conscious and don't want to tell each other their own salaries, for fear of either being ridiculed or getting their houses robbed. How can they find their average salary, without disclosing their own salaries?

 No Solution Yet Submitted by Danish Ahmed Khan Rating: 1.5000 (2 votes)

Comments: ( Back to comment list | You must be logged in to post comments.)
 No Subject | Comment 3 of 9 |

The first worker   writes   S =his salary +N (his secret number ),
passes it to the second worker.
The second worker adds his salary to S and passes this new  sum to the third.
The third worker    adds     his salary  and passes this new  S to the   first.

The first worker subtracts his secet number N.

He divides the result by 3 and gets the av. salary

 Posted by Ady TZIDON on 2013-04-01 11:45:10

 Search: Search body:
Forums (0)