Problem 5 solved.

Used Math.Max() method and the conditional operator ?: