pocketlang/tests/examples/fizzbuzz.pk
Thakee Nathees 6e91b66e69 else if change to elif again.
The primary purpose of this change is to disambiguate between
`else if` and `else \n if`.

Even though it's a breaking change, since it's at the very early
state we're allowed to make such breaking syntax change.

lang.write function moved to io and io.stdin, io.stdout, io.stderr
added for future streamed io operations

io.File read, write, open, close, getline, seek, tell implemented

str * int multiplication implemented
2022-05-24 15:31:36 +05:30

10 lines
159 B
Plaintext

for i in 1..100
if i%3 == 0 and i%5 == 0 then print('fizzbuzz')
elif i%3 == 0 then print('fizz')
elif i%5 == 0 then print('buzz')
else print(i)
end
end