FizzBuzz/Basic: Difference between revisions

Line 240:
 
sleep</syntaxhighlight>
 
=={{header|FTCBASIC}}==
<syntaxhighlight lang="basic">'uses carry command to perform modulus
'uses flag variable for elseif structure
 
define i = 0, f = 0, r = 0
 
do
 
let i = i + 1
let f = 1
 
let r = i / 15
carry r
 
if r = 0 then
 
let f = 0
print "FizzBuzz"
 
endif
 
let r = i / 3
carry r
 
if r = 0 and f = 1 then
 
let f = 0
print "Fizz"
 
endif
 
let r = i / 5
carry r
 
if r = 0 and f = 1 then
 
let f = 0
print "Buzz"
 
endif
 
if f = 1 then
 
print i
 
endif
 
loop i < 100
 
pause
end</syntaxhighlight>
 
===GW-BASIC===
305

edits