At the end, C knows the sum of the salaries, his own salary and the manner in which it was partitioned, a1 (since he was told it), b2 (since he knows what he told B), and a2+b1 (since it was declared out loud). But there’s no way for him to separate a2+b1, so he doesn’t know the salaries of the other two. ]]>

[spoiler]Each coworker i knows their salary Si. Furthermore, coworker 1 makes a random number R from a range large enough that R+Si gives acceptably little information about Si, and doesn’t tell it to anyone else.

1 Computes S1 + R and gives it to 2

2 Computes S1 + S2 + R and gives it to 3

3 Computes S1 + S2 + S3 + R and gives it to 1

1 Computes S1 + S2 + S3 and tells everyone the result.

In the end, 1 knows S2+S3, 2 knows S1+R and S1+S3, and 3 knows S1+S2+R and S1+S2, and can deduce R. None of this is enough for any of them to deduce the others’ individual salaries.[/spoiler]

]]>Here is one way:

You get a random integer in some range like [0.2*salary, 5*salary], add it to your salary, and then write that number down on a piece of paper and pass it to person #2. Person #2 adds their salary to the number, writes this new number down on a new piece of paper and passes it to person #3. Person #3 adds their salary to the number, writes the new sum on a new piece of paper and passes it back to you. You subtract off the random number, and announce the result, which is the sum of the three salaries. ]]>