Create longest-line.c

Fixed version of the code.