Integer comparison: Difference between revisions
Content added Content deleted
(Emacs Lisp: Improve solution) |
(Integer comparison in various BASIC dialents) |
||
Line 681: | Line 681: | ||
180 PRINT A;"is greater than ";B |
180 PRINT A;"is greater than ";B |
||
190 END SELECT</lang> |
190 END SELECT</lang> |
||
==={{header|BASIC256}}=== |
|||
<lang freebasic>input "Please enter one integer: ", x |
|||
input "and a second integer: ", y |
|||
if x < y then print x; " is less than "; y |
|||
if x = y then print x; " is equal to "; y |
|||
if x > y then print x; " is greater than "; y</lang> |
|||
==={{header|QBasic}}=== |
|||
<lang qbasic>INPUT "Please enter two integers, separated by a comma: ", x, y |
|||
IF x < y THEN PRINT x; " is less than "; y |
|||
IF x = y THEN PRINT x; " is equal to "; y |
|||
IF x > y THEN PRINT x; " is greater than "; y</lang> |
|||
==={{header|True BASIC}}=== |
|||
<lang qbasic>PRINT "Please enter two integers, separated by a comma: "; |
|||
INPUT x, y |
|||
IF x < y THEN PRINT x; " is less than "; y |
|||
IF x = y THEN PRINT x; " is equal to "; y |
|||
IF x > y THEN PRINT x; " is greater than "; y |
|||
END</lang> |
|||
==={{header|Yabasic}}=== |
|||
<lang yabasic>input "Please enter two integers, separated by a comma: " x, y |
|||
if x < y then print x, " is less than ", y : fi |
|||
if x = y then print x, " is equal to ", y : fi |
|||
if x > y then print x, " is greater than ", y : fi</lang> |
|||
==={{Header|Tiny BASIC}}=== |
==={{Header|Tiny BASIC}}=== |