Answered step by step
Verified Expert Solution
Link Copied!
Question
1 Approved Answer

Here is some code that uses recursion. Assume that all values are integers and that the call to MyWriter is recursive. Procedure MyWriter(last, current: integer);

Here is some code that uses recursion. Assume that all values are integers and that the call to MyWriter is recursive.

Procedure MyWriter(last, current: integer);

Begin

If (current < 55) then

Begin

Temp := current + last;

MyWriter(current, temp);

Print(current);

End; {then clause}

End; {the procedure MyWriter

If I make an initial call to MyWriter of MyWriter(1, 2), what will be printed?

You may rewrite this in your favorite programming language to check your answer.

Assume that the line Print(current) prints out the value of current on a new line of output.

Output is: ____________, ____________, ____________, _____________, ____________, _____________, ____________

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image
Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Basics Computer EngineeringInformation Warehouse Basics From Science

Authors: Odiljon Jakbarov ,Anvarkhan Majidov

1st Edition

620675183X, 978-6206751830

More Books

Students explore these related Databases questions

Question

How to solve maths problems with examples

Answered: 3 weeks ago

Question

Explain Coulomb's law with an example

Answered: 3 weeks ago

Question

What is operating system?

Answered: 3 weeks ago