((lambda (a b c d s i) (letrec ;; 0 input "What is the value of A" a ((stmt0 (lambda () (display "What is the value of A") (display "? ") (set! a (read)) (stmt1))) ;; 1 input "What is the value of B" b (stmt1 (lambda () (display "What is the value of B") (display "? ") (set! b (read)) (stmt2))) ;; 2 input "What is the value of C" c (stmt2 (lambda () (display "What is the value of C") (display "? ") (set! c (read)) (stmt3))) ;; 3 let d = ((b * b) - (4.0 * (a * c))) (stmt3 (lambda () (set! d (- (* b b) (* 4 (* a c)))) (stmt4))) ;; 4 if (d < 0) then 9 (stmt4 (lambda () (if (< d 0) (stmt9) (stmt5)))) ;; 5 gosub 11 (stmt5 (lambda () (stmt11) (stmt6))) ;; 6 print "The 1st root is: " (((-1.0 * b) + s) / (2.0 * a)) (stmt6 (lambda () (display "The 1st root is: ") (display (/ (+ (* -1 b) s) (* 2 a))) (newline) (stmt7))) ;; 7 "The 2nd root is: " (((-1.0 * b) - s) / (2.0 * a)) (stmt7 (lambda () (display "The 2nd root is: ") (display (/ (- (* -1 b) s) (* 2 a))) (newline) (stmt8))) ;; 8 end (stmt8 (lambda () (void))) ;; 9 print "Imaginary roots." (stmt9 (lambda () (display "Imaginary roots.") (newline) (stmt10))) ;; 10 end (stmt10 (lambda () (void))) ;; 11 let s = 1 (stmt11 (lambda () (set! s 1) (stmt12))) ;; 12 let i = 1 (stmt12 (lambda () (set! i 1) (stmt13))) ;; 13 let s = ((s + (d / s)) / 2) (stmt13 (lambda () (set! s (/ (+ s (/ d s)) 2)) (stmt14))) ;; 14 if (i >= 10) then 17 (stmt14 (lambda () (if (>= i 10) (stmt17) (stmt15)))) ;; 15 let i = (i + 1) (stmt15 (lambda () (set! i (+ i 1)) (stmt16))) ;; 16 goto 13 (stmt16 (lambda () (stmt13))) ;; 17 return (stmt17 (lambda () (void)))) (stmt0))) 0 0 0 0 0 0)