Define a procedure readforintdivide to read the two input


PLEASE READ CAREFULLY; NO FUNNY BUSINESS.

THIS WILL BE DONE USING DRRACKETS SCHEME.

1. Define a procedure "ReadForIntDivide" to read the two input values for the IntDivide procedure defined in the previous. This procedure takes no parameters and will pass an input value to the Square procedure.

ex. > (ReadForIntDivide)

2. Define a recursive procedure called "Multiply" that will compute the product of x times y. You must implement Multiply procedure by a sequence of additions.

-You can use the built-in + operation.

-You will need to account for negative values as well.

ex. > (Multiply 8 3)

3. Define a procedure (DiffDivide x y) that will compute the following expression:

x - (x/y)*y. For example, if x = 8 and y = 3, then, 8 - (8/3)*3 = 2

You must use Subtract, IntDivide, and Multiply defined in the previous questions.

ex. > (DiffDivide 8 3)

4. Re-implement the procedure (DiffDivide x y) and call it (DiffDivideLet x y). In this procedure, you must use let-form to bind all the procedures used in the definition: Subtract, IntDivide, and Multiply. You may name the local name whatever you'd like.

ex. > (DiffDivideLet 8 3)

Request for Solution File

Ask an Expert for Answer!!
Computer Engineering: Define a procedure readforintdivide to read the two input
Reference No:- TGS02893509

Expected delivery within 24 Hours