SICP exercise 1.02

From Drewiki

(Redirected from SICP exercise 1.2)
Jump to: navigation, search

Problem

Translate the following expression into prefix form:


\frac{5+4+(2-(3-(6+\frac{4}{5})))}{3(6-2)(2-7)}

Solution

(/
 (+ 5 4
    (- 2
       (- 3
          (+ 6
             (/ 4 5)))))
 (* 3
    (- 6 2)
    (- 2 7)))
Personal tools