6.001, Spring 2004—Recitation 3 1MASSACHVSETTS INSTITVTE OF TECHNOLOGYDepartment of Electrical Engineering and Computer Science6.001—Structure and Interpretation of Computer ProgramsSpring 2004Recitation 3RecursionScheme1. Special Forms(a) cond - (cond clause clause ...)Each clause is either (test consequent) or (else alternative). Tests each clause in orderand if the test evaluates to not false, evaluates the consequent.Problems1. Write a procedure fact that computes the factorial of a number n.Plan:2. Write a procedure remainder that computes the remainder of num divided by divisor.Plan:3. Write a procedure that computes e.Plan:6.001, Spring 2004—Recitation 3 24. Write an iterative procedure that computes e.Plan:5. Write a procedure fib that computes the nthfibonacci number.Plan:6. Write a procedure that computes the golden ratio, φ.Plan:7. Write a procedure that computes
View Full Document