Skip to content

Instantly share code, notes, and snippets.

@biscuitvile
Created November 25, 2014 00:48
Show Gist options
  • Save biscuitvile/2e04427f278a0c9137f4 to your computer and use it in GitHub Desktop.
Save biscuitvile/2e04427f278a0c9137f4 to your computer and use it in GitHub Desktop.
Reverse Input

Reverse the Input

Write a program which reads a number of strings from standard input and prints them in reverse order on the screen. The input sequence is terminated with the string END.

$ reverse-strings
one
two
three
END
-> three
-> two
-> one
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment