Discrete Mathematics and Its Applications, Seventh Edition

Published by McGraw-Hill Education
ISBN 10: 0073383090
ISBN 13: 978-0-07338-309-5

Chapter 5 - Section 5.5 - Program Correctness - Exercises - Page 377: 1

Answer

Algorithm 1 when it is given n = 5 as input. That is, show all steps used by Algorithm 1 to find 5!,

Work Step by Step

--Suppose that x = 0. The program segment first assigns the value 1 to y and then assigns the value x + y = 0 + 1 = 1 to z.
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.