Writing pseudocode for a program


Assignment:

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.

Solution Preview :

Prepared by a verified Expert
Electrical Engineering: Writing pseudocode for a program
Reference No:- TGS01897290

Now Priced at $30 (50% Discount)

Recommended (98%)

Rated (4.3/5)