Sha256: 3954c7374454ee25cafbfdfd69e44e7c1862c6c8a1de3293be2ee6c377098295

Contents?: true

Size: 316 Bytes

Versions: 10

Compression:

Stored size: 316 Bytes

Contents

program arithmetic(input, output)

var
 a, b: integer;

begin
 readln(a, b);
 writeln('a+b = ', a+b);
 writeln('a-b = ', a-b);
 writeln('a*b = ', a*b);
 writeln('a/b = ', a div b, ', remainder ', a mod b);
 writeln('a^b = ',Power(a,b):4:2);    {real power}
 writeln('a^b = ',IntPower(a,b):4:2); {integer power}
end.

Version data entries

10 entries across 7 versions & 1 rubygems

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