Skip to content

Instantly share code, notes, and snippets.

@geko727
Created April 25, 2013 16:59
Show Gist options
  • Save geko727/5461315 to your computer and use it in GitHub Desktop.
Save geko727/5461315 to your computer and use it in GitHub Desktop.
def num(n)
a = 0
for i in 0..n
for j in 0..n
if i + j == n
a = a + 1
end
end
end
a
end
num(5)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment