A common construct found in many algorithms is a loop. Using pseudocode, write a pre-condition loop to output all of the even numbers between 99 and 201.

Key points when answering questions are the marks given for it and how the question is defined. In this example we need to write a pre-condition loop to output all the even numbers in the range (99,201), and so it gives 4 marks for it. First of all we need to write a while loop because of the pre-condition loop requirement and set a counter to keep count of the numbers we need (in this case we take the first even number after 99 which is the 100). Then we increment the counter by 2 (since we need just even numbers) and set the ending condition to the range of numbers set (which is 201).Counter <- 100 WHILE Counter < 201 Output Counter Counter <- Counter + 2 ENDWHILE

SA
Answered by Stylianos A. Computing tutor

3202 Views

See similar Computing A Level tutors

Related Computing A Level answers

All answers ▸

Given an unlimited number of light bulbs (that break at a certain height), and a building with 100 floors, how do you determine the height that the light bulb breaks?


Some problems are intractable. What does it mean for a problem to be described as intractable?


Simplify the following Boolean expression: ¬(AvB) v ¬(CvD) v ¬A^(BvC) v (¬A^A)


What are the different development methodologies and what are their advantages and disadvantages?


We're here to help

contact us iconContact ustelephone icon+44 (0) 203 773 6020
Facebook logoInstagram logoLinkedIn logo

MyTutor is part of the IXL family of brands:

© 2026 by IXL Learning