Write code program from Exam 1