Four honest and hard-working computer engineers are sipping coffee at Starbucks. They wish to compute their average salary. However, nobody is willing to reveal an single bit of information about his/her own salary to anybody else. How do they do it?
The first engineer picks a random large number(let say L), adds his salary to it and writes the sum on a chit. The chit is passed around. Everyone else adds his salary to the number wriiten on the chit passed to him. And passes the new sum to next. When it returns to the first engineer, he subtracts his integer (L) .