created function to reverse input one line at a time
created char array printing function
created space stripping function