Depending on whether the number was odd or even, performed different calculations using while statements