handshakes 🌶️🌶️
At a meeting every person shakes hands once with every other person. Write a method handshakes that takes the number of people (0 or more) and returns how many handshakes there are. Count them with nested loops: for each person, count the handshakes with the people who come after them.
For example, handshakes(3) is 3, handshakes(5) is 10, and handshakes(1) is 0.
If person i shakes hands with each person who comes after i, where should the inner loop start?
Check handshakes(3) by hand: how many times does the inner loop body run?