49.5k views
1 vote
Pls give the output of this pseudocode

Pls give the output of this pseudocode-example-1
User Dharga
by
4.1k points

1 Answer

4 votes

Answer:

2

4

6

8

10

9

Step-by-step explanation:

The loop runs from 1 to 10 in steps of 2, that is excluding the 10, so the values y gets are 1,3,5,7,9. The values that are printed are one higher, i.e., 2,4,6,8,10. Then finally the unchanged value of x is printed, which is 9.

QBasic implementation attached.

Pls give the output of this pseudocode-example-1
User Nberger
by
4.4k points