Sha256: 781fc5f36116e1567d91b06ef94a659c790490f0b5c70472f6a0c830762f38a3

Contents?: true

Size: 961 Bytes

Versions: 10

Compression:

Stored size: 961 Bytes

Contents

IGNORELINE Note: This example includes the math module.
include arithmeticmodule
:a
editvar /newvar /value=a /title=Enter first integer: 
editvar /newvar /value=b /title=Enter second integer:
editvar /newvar /value=c 
do add -a-,-b-=-c-
printline -c-
do subtract a,b
printline -c-
do multiply a,b
printline -c-
do divide a,b
printline -c-
do modulus a,b
printline -c-
editvar /newvar /value=d /title=Do you want to calculate more numbers?
if -d- /hasvalue yes goto :a else goto :end
:end

IGNORELINE Note: This example does not use the math module.
:a
editvar /newvar /value=a /title=Enter first integer: 
editvar /newvar /value=b /title=Enter second integer:
editvar /newvar /value=-a-+-b-=-c-
printline -c-
editvar /newvar /value=a*b=c
printline -c-
editvar /newvar /value=a/b=c
printline -c-
editvar /newvar /value=a %% b=c
printline -c-
editvar /newvar /value=d /title=Do you want to calculate more numbers?
if -d- /hasvalue yes goto :a else goto :end
:end

Version data entries

10 entries across 7 versions & 1 rubygems

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