Skip to content

Instantly share code, notes, and snippets.

@craigmartin
Created August 2, 2011 11:37
Show Gist options
  • Save craigmartin/1120034 to your computer and use it in GitHub Desktop.
Save craigmartin/1120034 to your computer and use it in GitHub Desktop.
answer to #1
sum = (1..100).inject(0){|cummulative,n| cummulative+n}
puts sum
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment