Skip to content

Instantly share code, notes, and snippets.

@blackknight36
Created February 23, 2017 21:33
Show Gist options
  • Save blackknight36/6c30a9e4a8741f8baa61dc5fde159e78 to your computer and use it in GitHub Desktop.
Save blackknight36/6c30a9e4a8741f8baa61dc5fde159e78 to your computer and use it in GitHub Desktop.
#!/usr/bin/ruby
n = 5
z = 1
while n > 0
z += 4*(n-1)
n -= 1
end
puts z
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment