Pseudo Code
Not what you're looking for?
Write the pseudocode for a program that does the following:
The user is prompted to enter an integer between 1 and 1000. When the user enters the integer, the program uses a repetition control structure to validate whether the integer is within the proper range; otherwise, the prompt is continuously redisplayed to the user until an integer in the proper range is entered.
If the integer is odd, the program uses a repetition control structure to display the next five consecutive odd integers to the user. If the integer is even, the program uses a repetition control structure to display the next five consecutive even integers to the user. Here is an example of how the program should run:
Please enter an integer between 1 and 1000:
-1
Please enter an integer between 1 and 1000:
88
Here are the next five even integers:
90
92
94
96
98.
Purchase this Solution
Solution Summary
This posting writes the pseudocode for a program that does the following.
Solution Preview
Please see the attachment for the solution to the given problem.
Pseudo Code
Note: All comments in the pseudo code will be indicated by double slash (//)
Begin
{
Declare Number as Integer //This will be the variable to be initialized
Declare Iteration = 2 as Integer //This will be the variable to be ...
Purchase this Solution
Free BrainMass Quizzes
Air Pollution Control - Environmental Science
Working principle of ESP
Architectural History
This quiz is intended to test the basics of History of Architecture- foundation for all architectural courses.