RosettaCodeData/Task/Arithmetic-Integer/PL-I/arithmetic-integer.pli

8 lines
272 B
Plaintext

get list (a, b);
put skip list (a+b);
put skip list (a-b);
put skip list (a*b);
put skip list (trunc(a/b)); /* truncates towards zero. */
put skip list (mod(a, b)); /* Remainder is always positive. */
put skip list (rem(a, b)); /* Sign can be negative. */