Completed input.c