Start Read n Initialize i to 1. while i < n do: Write i Increment i end while…

UP Police Computer Operator Grade A 2017

Start
Read n
Initialize i to 1.
while i < n do:
Write i
Increment i
end while
Stop.

Which of the following options is CORRECT?

  1. A.

    Read number n and print the integers counting up to (n-1)

  2. B.

    Read number n and print the integers counting up to i

  3. C.

    Read number n and print the integers counting up to (n+1)

  4. D.

    Read number n and print the integers counting up to n

Attempted by 489 students.

Sign up free to check your answer

Sign up free

Explore the full course: Gate Guidance By Sanchit Sir

Loading lesson…