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 - Chapter Review Problems - Page 268: 52

Answer

$a=345$ $b=89$

Work Step by Step

After calling the CodeWrite function the control will enter the if block because the condition a>0 and b>0 is true, then the given mathematical operation will be performed and we have: $a=78,b=89$ $a=78+89=167$ $a=167+89=256$ $a=256+89=345$ So in the end we will have: $a=345$ $b=89$
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.