Fixed some compiler warnings in problem 2
Fixed some compiler warnings in problem 3
Fixed a compiler warning in problem 4