Completed first 3 problems in C