Computer Science: An Overview: Global Edition (12th Edition)

Published by Pearson Higher Education
ISBN 10: 1292061162
ISBN 13: 978-1-29206-116-0

Chapter 5 - Algorithms - Section 5.5 - Recursive Structures - Questions & Exercises - Page 253: 3

Answer

1, 2, 3, 3, 2, 1

Work Step by Step

sequence of numbers would be printed by the following recursive procedure if we started it with N assigned the value 1 procedure Exercise (N) print the value of N; if (N < 3) then (apply the procedure Exercise to the value N + 1); print the value of N. 1, 2, 3, 3, 2, 1
Update this answer!

You can help us out by revising, improving and updating this answer.

Update this answer

After you claim an answer you’ll have 24 hours to send in a draft. An editor will review the submission and either publish your submission or provide feedback.