;; ;; Basic arithmetic operations. ;; ;; Addition. (print "(+ 10 100) -> ") (display (+ 10 100)) (newline) (print "(+ 1 -2 3 4) -> ") (display (+ 1 -2 3 4)) (newline) ;; Substraction. (print "(- 100 75) -> ") (display (- 100 75)) (newline) (print "(- 10 20 30) -> ") (display (- 10 20 30)) (newline) ;; Multiplication. (print "(* 10 7) -> ") (display (* 10 7)) (newline) (print "(* -1 66) -> ") (display (* -1 66)) (newline) ;; Division. (print "(/ 45 5) -> ") (display (/ 45 5)) (newline) (print "(/ 10 5 2) -> ") (display (/ 10 5 2)) (newline) ;; Remainder/modulo. (print "(% 45 5) -> ") (display (% 45 5)) (newline) (print "(% 45 7) -> ") (display (% 45 7)) (newline) (print "(% 120 45) -> ") (display (% 120 45)) (newline) (print "(% 120 45 8) -> ") (display (% 120 45 8)) (newline) ;; Nesting operations. (print "(* 20 (+ 100 (- 50 30) (/ 300 3)) 10) -> ") (display (* 20 (+ 100 (- 50 30) (/ 300 3)) 10))