Sha256: 2804b98599ab3030611fb9bcf53ecf9d89fc32f1800dc6025bae47cdf2d77c5e

Contents?: true

Size: 366 Bytes

Versions: 10

Compression:

Stored size: 366 Bytes

Contents

let a = float2nr(input("Number 1: ") + 0)
let b = float2nr(input("Number 2: ") + 0)
echo "\nSum: " . (a + b)
echo "Difference: " . (a - b)
echo "Product: " . (a * b)
" The result of an integer division is truncated
echo "Quotient: " . (a / b)
" The sign of the result of the remainder operation matches the sign of 
" the first operand 
echo "Remainder: " . (a % b)

Version data entries

10 entries across 7 versions & 1 rubygems

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