Software Engineering
Accenture PrimermediumSoftware Engineering04 Looping Statements

Accenture Software Engineering Practice Question

What will be the output for WHILE loop? BEGIN DECLARE number SET number <-- 30 WHILE number>0 number <-- number-4 END WHILE PRINT number END

Answer options

A
4
B
2
C
-2
D
0

Correct answer: 2

Explanation

Correct answer: 2.

Related Accenture Software Engineering questions

Practice more Accenture Software Engineering questions

PrimerDumps has 1400+ primer questions, 2026 mocks and coding hands-on — all free.