Integer comparison: Difference between revisions
Content deleted Content added
PascalABC.NET |
Add SmallBASIC |
||
Line 935:
if n1 > n2 then print "1st number ";n1;" is greater than 2nd number";n2
if n1 = n2 then print "1st number ";n1;" is equal to 2nd number";n2</syntaxhighlight>
==={{header|SmallBASIC}}===
<syntaxhighlight 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
</syntaxhighlight>
==={{header|TI-83 BASIC}}===
|