Added Solution for Program 3