Problem Number 4

Code for problem 4.