Problem 3 solved.
Problem 4 solved.
Problem 5 solved.

Using switch/case operators.