Sha256: b25edb590e54d4813fd9a43587034dad365bd5b497b42d96d3728323c8c9b64c

Contents?: true

Size: 645 Bytes

Versions: 10

Compression:

Stored size: 645 Bytes

Contents

''CBTJD'': 2020/03/12
START:
INPUT "Enter two integers (a,b):"; a!, b!
IF a = 0 THEN END
IF b = 0 THEN
    PRINT "Second integer is zero. Zero not allowed for Quotient or Remainder."
    GOTO START
END IF
PRINT
PRINT "             Sum = "; a + b
PRINT "      Difference = "; a - b
PRINT "         Product = "; a * b
' Notice the use of the INTEGER Divisor "\" as opposed to the regular divisor "/".
PRINT "Integer Quotient = "; a \ b, , "* Rounds toward 0."
PRINT "       Remainder = "; a MOD b, , "* Sign matches first operand."
PRINT "  Exponentiation = "; a ^ b
PRINT
INPUT "Again? (y/N)"; a$
IF UCASE$(a$) = "Y" THEN CLS: GOTO START
CLS
END

Version data entries

10 entries across 7 versions & 1 rubygems

Version Path
zettacode-0.1.7 files.zettacode/arithmetic.integer/qb64.txt
zettacode-0.1.6 files.zettacode/arithmetic.integer/qb64.txt
zettacode-0.1.6 files.zettacode2/arithmetic.integer/qb64.txt
zettacode-0.1.5 files.zettacode/arithmetic.integer/qb64.txt
zettacode-0.1.5 files.zettacode2/arithmetic.integer/qb64.txt
zettacode-0.1.4 files.zettacode/arithmetic.integer/qb64.txt
zettacode-0.1.4 files.zettacode2/arithmetic.integer/qb64.txt
zettacode-0.1.3 files.zettacode/arithmetic.integer/qb64.txt
zettacode-0.1.2 files.zettacode/arithmetic.integer/qb64.txt
zettacode-0.1.1 zettacode.files/arithmetic.integer/qb64.txt