exercise chapter 2 part 2, c#