RosettaCodeData/Task/A+B/True-BASIC/a+b.basic
2023-07-01 13:44:08 -04:00

11 lines
294 B
Text

DO
INPUT PROMPT "Enter two integers separated by a comma: ": A, B
IF ABS(A)>1000 OR ABS(B)>1000 OR IP(A)<>A OR IP(B)<>B THEN
PRINT "Both integers must be in the interval [-1000..1000] - try again."
PRINT
ELSE
PRINT "Their sum is";A+B
EXIT DO
END IF
LOOP
END