Answer:
n(n-1)/2 is the formula
Explanation:
n(n-1) divided by 2 is the formula
with this you can solve any questions like this 
for example you have 6 person so,
n(n-1)/2 
6(6-1)/2 
6(5)/2
30/2 
 there will be 15 handshakes
the answer to this question is the formula
n(n-1)/2