Describe the behaviour of procedure, C/C++ Programming

Observe that our model of evaluation allows for combinations whose operators are compound expressions.

(a) Use this observation to describe the behavior of the following procedure:

(define (a-or-b-depending-on-value a b)
((cond ((< b a) +) ((= b 0) -) ((= a 0) /) (else *)) a b))

Your answer should describe what happens for all integer values of a and b. Illustrate your answer using the substitution model assuming applicative order evaluation.

(b) Write a procedure (check-it op p q r) that returns #t if p op q = r and #f otherwise. For example, (check-it * 3 2 6) would return #t as 3 * 2 = 6.

 

Posted Date: 3/25/2013 1:50:56 AM | Location : United States







Related Discussions:- Describe the behaviour of procedure, Assignment Help, Ask Question on Describe the behaviour of procedure, Get Answer, Expert's Help, Describe the behaviour of procedure Discussions

Write discussion on Describe the behaviour of procedure
Your posts are moderated
Related Questions
to count number of occurances

how to write c code to solve assignment problem?

What is the use of PEAR in php? PEAR is termed as PHP Extension and Application Repository. It provides structured library to PHP users and also gives provision for package mai

Write two different arrays. Store the names in it and then compare if both the names entered by the user are the same.


You are going to write a function that computes the total interest charged on a credit card before it is paid off. List all the inputs the function will need.

Ask question # Byteland county is very famous for luminous jewels. Luminous jewels are used in making beautiful necklaces. A necklace consists of various luminous jewels of particu

i need to do my home work

Byteland county is very famous for luminous jewels. Luminous jewels are used in making beautiful necklaces. A necklace consists of various luminous jewels of particular colour. Nec