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: 3

Answer

Algorithm 1 when it is given n = 6 as input. That is, show all steps used by Algorithm 1 to finding 6!, -x+y = 2+3 = 5 to z.

Work Step by Step

--Suppose that y = 3. -The program segment assigns the value 2 to x and then assigns the value -- x+y = 2+3 = 5 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.