Sha256: 21b50d7c0437d7bd877af8cb17c20727afdfe1288107e2628883fde61afc605a
Contents?: true
Size: 514 Bytes
Versions: 10
Compression:
Stored size: 514 Bytes
Contents
(DEFUN INTEGER-ARITHMETIC () (DISPLAY "Enter two integers separated by a space.") (NEWLINE) (DISPLAY "> ") (DEFINE A (READ)) (DEFINE B (READ)) (DISPLAY `(SUM ,(+ A B))) (NEWLINE) (DISPLAY `(DIFFERENCE ,(- A B))) (NEWLINE) (DISPLAY `(PRODUCT ,(* A B))) (NEWLINE) (DISPLAY `(QUOTIENT ,(QUOTIENT A B))) ; truncates towards zero (NEWLINE) (DISPLAY `(REMAINDER ,(REM A B))) ; takes sign of first operand (NEWLINE) (DISPLAY `(EXPONENTIATION ,(EXPT A B))))
Version data entries
10 entries across 7 versions & 1 rubygems