Invitation to Computer Science 8th Edition

Published by Cengage Learning
ISBN 10: 1337561916
ISBN 13: 978-1-33756-191-4

Chapter 2 - Exercises - Page 87: 13

Answer

Step 1 Get values for $N U M B E R, N_{1}, \ldots N_{10000}$ and $T_{1}, \ldots T_{10000}$ Step 2 Set the value of $i$ to 1 and count to 0 Step 3 While $(i \leq 10000)$ do Steps 3 through 6 Step 4$\quad$ If $\left(N U M B E R=T_{i}\right)$ then print $N_{i}$ and Step 5 Add 1 to the value of Count Step 6 Add 1 to the value of $i$ Step 7 If $(\text {count}>0)$ then print "There are count occurrences." Step 8 Stop

Work Step by Step

--
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.