Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
|
|
@ -0,0 +1,10 @@
|
|||
10 DEF FN i()=((NOT (a OR b))+2*(a AND NOT b)+3*(b AND NOT a)+4*(a AND b)): REM the function can be placed anywhere in the program, but it gets executed faster if it's at the top
|
||||
20 FOR x=1 TO 20
|
||||
30 LET a=(x/2)=INT (x/2): REM comparison 1
|
||||
40 LET b=(x/3)=INT (x/3): REM comparison 2
|
||||
50 GO TO 50+10*FN i(): REM cases
|
||||
60 PRINT x;" is not divisible by 2 or 3": GO TO 100
|
||||
70 PRINT x;" is divisible by 2": GO TO 100
|
||||
80 PRINT x;" is divisible by 3": GO TO 100
|
||||
90 PRINT x;" is divisible by 2 and 3"
|
||||
100 NEXT x
|
||||
Loading…
Add table
Add a link
Reference in a new issue