Skip to content

Instantly share code, notes, and snippets.

@shelvacu
Created July 1, 2017 20:10
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save shelvacu/e04c237ad8d1c066a7fd8b5170261e25 to your computer and use it in GitHub Desktop.
Save shelvacu/e04c237ad8d1c066a7fd8b5170261e25 to your computer and use it in GitHub Desktop.
@last=1;END{(@last<6) ? puts(6): ''}
@last.nil? ? puts((@last=2)-1): @last=2
(3-@last>1) ? puts((@last+=2)-1): @last=3
(4-@last>1) ? puts((@last+=2)-1): @last=4
(5-@last>1) ? puts((@last+=2)-1): @last=5
(6-@last>1) ? puts((@last+=2)-1): @last=6
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment