Sha256: 92f403923777973210dcbba87d4d533d7fcc251b3849544ea46ad673a89b64b3

Contents?: true

Size: 643 Bytes

Versions: 10

Compression:

Stored size: 643 Bytes

Contents

:set-state-ok t

(defun get-two-nums (state)
   (mv-let (_ a state)
           (read-object *standard-oi* state)
      (declare (ignore _))
      (mv-let (_ b state)
              (read-object *standard-oi* state)
         (declare (ignore _))
         (mv a b state))))

(defun integer-arithmetic (state)
   (mv-let (a b state)
           (get-two-nums state)
      (mv state
          (progn$ (cw "Sum:        ~x0~%" (+ a b))
                  (cw "Difference: ~x0~%" (- a b))
                  (cw "Product:    ~x0~%" (* a b))
                  (cw "Quotient:   ~x0~%" (floor a b))
                  (cw "Remainder:  ~x0~%" (mod a b))))))

Version data entries

10 entries across 7 versions & 1 rubygems

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