Write pseudo code for the first question.