Skip to content

Instantly share code, notes, and snippets.

@geonnave
Created January 11, 2015 21:20
Show Gist options
  • Save geonnave/b73478dc2da72edc8fc8 to your computer and use it in GitHub Desktop.
Save geonnave/b73478dc2da72edc8fc8 to your computer and use it in GitHub Desktop.
pica pau counter
n = 17 #number of food items
i = 1 #food items pica-pau will get
j = 0 #food items zeca urubu will get
k = 0 #pica-pau food items plus zeca urubu food items
while k < n #k cannot be greater than n
print i.to_s + " pra voce;\n"
j = 1
while j <= i and k < n
print j.to_s + ", "
j += 1
k += 1
end
print "pra mim.\n"
i += 1
k += 1
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment