1. In your quiz you had a pseudo code like this which basically calculates the number of handshakes occurring among ‘n’
-
- Site Admin
- Posts: 899603
- Joined: Mon Aug 02, 2021 8:13 am
1. In your quiz you had a pseudo code like this which basically calculates the number of handshakes occurring among ‘n’
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}”)