Page 1 of 1

1. In your quiz you had a pseudo code like this which basically calculates the number of handshakes occurring among ‘n’

Posted: Mon Jul 11, 2022 9:50 am
by answerhappygod
1. In your quiz you had a pseudo code like this which basicallycalculates the number ofhandshakes occurring among ‘n’ people if all of them shake handswith each other. The pseudocode was something like this one :(n << input)handshakes = 0for (k = n ; k >= 1 ; k = k-1){for (i = k-1 ; i >= 1; i = i-1){handshakes = handshakes + 1}print(f“Total number of handshakes are {handshakes}”)