a rickety bridge of impossible crossing

dfinder.bas

For use with SmallBASIC.

cls
print "**************"
print "m;'s first app"
print "Divisor Finder"
print "**************"
# optional logo. place 240x240 png in  
# same folder & uncomment next 2 lines
# logo = image("logo.png")
# logo.show((xmax-240),0)
10 print
input "Number please";n
if int(n) <> n then
print "Whole numbers only please"
goto 10
endif
20 input "Second number please";m$
m = val(m$)
if m = 0 then
print "A number greater than zero please"
print
goto 20
endif
if int(m)<>m then
print "Whole numbers only please"
print
goto 20
endif
if n mod m <> 0 then 
print n; " is not divisible by ";m
goto 10
endif
print n;" is divisible by ";m
goto 10

⬅️ back to article