Prepare for your Next Interview
This is a discussion on Average Salary within the Brainteasers forums, part of the Brain Gym category; There are three friends. All three earns and have a fixed monthly salary. They sit together one day and tried to calculate their average salary. But the quest is that ...
|
|||
|
Average Salary
There are three friends. All three earns and have a fixed monthly salary.
They sit together one day and tried to calculate their average salary. But the quest is that one cannot disclose his salary to other friends. How can they calculate their average salary?
__________________
[B][COLOR="Blue"]Anyone who thinks he knows all the answers, must not be up-to-date on the questions[/COLOR][/B] [B]Anshul[/B]:) |
| Sponsored Links |
|
|||
|
Re: Average Salary
Suppose A,B,C are d 3 frnds.
Now, A 's salary -- AS B's salary -- BS C's salary --- CS And A, to his salary adds a random no.(AR) and den tells dat to B. B also adds sm random number(BR) to his salary and adds to the number whatever A has given ie. AS+AR+BS+BR. and gives to C C also adds sm random number to his salary and adds dat to wtevr B has given him. AS+BS+CS+AR+BR+CR Now... A subtracts his random no. from the sum --- AS+BS+CS+BR+CR Then B 2 vl subtract his random no. --- AS+BS+CS+CR C 2 vl subtract -------------------- AS +BS +CS Now,after C is done..the result is divided by 3 --- which gives the average of the salary. From this,once d average is known..any of them cn knw d sum of d other 2 salaries |
| The Following User Says Thank You to neelim For This Useful Post: | ||
|
|||
|
Re: Average Salary
Gud job neeliim
__________________
[B][COLOR="Blue"]Anyone who thinks he knows all the answers, must not be up-to-date on the questions[/COLOR][/B] [B]Anshul[/B]:) |
![]() |
|
| Thread Tools | |
| Display Modes | |
|
|
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| What is the value for MAX(SALARY) | Geek_Guest | SQL | 3 | 04-04-2007 04:01 AM |
| what is the average speed ? | psuresh1982 | Brainteasers | 4 | 01-04-2007 04:51 AM |
| what is the average speed? | psuresh1982 | Brainteasers | 2 | 11-28-2006 08:27 AM |
| In 24 Hours Average Human | Lokesh M | Geeks Lounge | 0 | 09-29-2006 03:08 PM |
| Assessing Salary | admin | Career Advice | 1 | 09-27-2006 05:23 AM |