Added input error check to Code1_4.c