Assignment 3 C Programming Solution