Question: . Assume that the value four (4) is input when appropriate. Pseudocode for Quiz #6 Main. { Call RptInit. While (a < k) { Call

. Assume that the value four (4) is input when appropriate.

Pseudocode for Quiz #6

Main. { Call RptInit. While (a < k) { Call IteRate. } Call RptOut. Stop! } IteRate. { Call UpTot. Call UpCount. Output a. } UpCount. { If (a <= 2) { b = b + 1. } Else { b = b + 2. } Output b.

} UpTot. { a = a + 1. t = t + a. } RptOut. { Output k. Output t. } RptInit. { a = b = 0. t = 1. Input k. }

1. What value will be output first?

a. 0 b. 1 c. 2 d. 3 e. none of the above

2. What value will be output next?

a. 1 b. 2 c. 3 d. 4 e. none of the above

3. What value will be output next?

a. 2 b. 3 c. 4 d. 5 e. none of the above

4. What value will be output next?

a. 2 b. 3 c. 6

d. 7 e. none of the above

5. What value will be output next? ?

a. 4 b. 5 c. 6 d. 8 e. none of the above

6. What value will be output next? ?

a. 3 b. 4 c. 5 d. 6 e. none of the above

7. What value will be output next?

a. 4 b. 6 c. 7 d. 9 e. none of the above

8. What value will be output next? ?

a. 4 b. 5 c. 15 d. 16 e. none of the above

9. How many values will be output?

a. 9 b. 10 c. 12

10. What value will be output last?

a. 5 b. 9 c. 11 d. 15 e. none of the above

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!