Skip to content

Instantly share code, notes, and snippets.

@gaurish gaurish/gist:3461601
Created Aug 25, 2012

What would you like to do?
#!/usr/bin/env ruby
a = b = c = 0
range = 1..1_00_000 #same as writing 100000 but ruby allows us to insert underscores which makes large numbers easy to read
range.each do |i|
a = a + b + i
b = a * 5678 + i
c = i * i
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.