Created
January 11, 2015 21:20
-
-
Save geonnave/b73478dc2da72edc8fc8 to your computer and use it in GitHub Desktop.
pica pau counter
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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