added output.c, corrected typo in input.c