Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
[COLOR=#804040][b]CLS[/b][/color]
[COLOR=#804040][b]INPUT[/b][/color] [COLOR=#ff00ff]"K = "[/color], K
[COLOR=#804040][b]INPUT[/b][/color] [COLOR=#ff00ff]"N = "[/color], N
[COLOR=#0000ff]REM if 2 ^ K < N then X = 1[/color]
[COLOR=#0000ff]REM if 2 ^ K = N then X = 2[/color]
[COLOR=#0000ff]REM if 2 ^ K > N then X = 3[/color]
[COLOR=#0000ff]REM X = SGN(2 ^ K - N) + 2[/color]
[COLOR=#0000ff]REM PRINT "X = ", X[/color]
[COLOR=#804040][b]ON[/b][/color] [COLOR=#008080]SGN[/color]([COLOR=#ff00ff]2[/color] ^ K - N) + [COLOR=#ff00ff]2[/color] [COLOR=#804040][b]GOTO[/b][/color] less, equal, greater
less:
[COLOR=#804040][b]PRINT[/b][/color] [COLOR=#ff00ff]"2 ^ K < N"[/color]
[COLOR=#804040][b]END[/b][/color]
equal:
[COLOR=#804040][b]PRINT[/b][/color] [COLOR=#ff00ff]"2 ^ K = N"[/color]
[COLOR=#804040][b]END[/b][/color]
greater:
[COLOR=#804040][b]PRINT[/b][/color] [COLOR=#ff00ff]"2 ^ K > N"[/color]
[COLOR=#804040][b]END[/b][/color]