Using the substitution model illustrate the process, C/C++ Programming

Each of the following two procedures defines a method for adding two positive integers in terms of the procedures inc, which increments its argument by 1, and dec, which decrements its argument by 1:

(define (plus1 a b)

(if (= a 0)

b

(inc (plus1 (dec a) b))))

(define (plus2 a b)

(if (= a 0)

b

(plus2 (dec a) (inc b))))

Using the substitution model, illustrate the process generated by each procedure in evaluating (+ 2 5). Are these processes iterative or recursive?

Posted Date: 3/28/2013 3:26:33 AM | Location : United States







Related Discussions:- Using the substitution model illustrate the process, Assignment Help, Ask Question on Using the substitution model illustrate the process, Get Answer, Expert's Help, Using the substitution model illustrate the process Discussions

Write discussion on Using the substitution model illustrate the process
Your posts are moderated
Related Questions
An anagram is a type of word play, the result of rearranging the letters of a word or phrase to produce a new word or phrase. For example the anagram of tea is tea, tae, eat, eta,

a program to find the area under curve y=f(x) between x=a and x=b,integrate y=f(x) between the limits of a and b.   #include float start_point, /* G

Ask questioGiven an integer n and a permutation of numbers 1, 2 ... , n-1, n write a program to print the permutation that lexicographically precedes the given input permutation. I

Define register with bit fields? We could define register simply with bit fields: struct DISK_REGISTER { unsigned ready:1; unsigned error_occured:1; unsigned disk_spinni

Problem Statement: You have to write a C program to develop a Car Parking Management System for a busy commercial area. The system will record the car plate number, date and time w

Classify computer systems according to capacity. How they are different from computers according to the classification of technology. Provide comparative study also.

This is what I need help with. "Create a program creates an interface allowing the user to select from some other programs I have made one being a money converter and the other ca


A palindrome is a string that reads the same from both the ends. Given a string S convert it to a palindrome by doing character replacement. Your task is to convert S to palindrome