FizzBuzz/Basic: Difference between revisions

No edit summary
Line 187:
===Craft Basic===
{{works with|Craft Basic}}
<syntaxhighlight lang="basic">dofor i = 1 to 100
 
let i = i + 1
let f = 1
 
if i % 15 = 0 then
 
let f = 0
print "FizzBuzz"
 
else
endif
 
if i % 3 = 0 and f = 1 then
 
print "Fizz"
let f = 0
print "Fizz"
 
else
endif
 
if i % 5 = 0 and f = 1 then
 
print "Buzz"
let f = 0
print "Buzz"
 
else
endif
 
print i
if f = 1 then
 
print i endif
 
endif
 
endif
 
next i
loop i < 100</syntaxhighlight>
 
loop i < 100end</syntaxhighlight>
 
===FreeBASIC===
305

edits