Explore BrainMass
Share

Explore BrainMass

    Pseudo Code

    This content was COPIED from BrainMass.com - View the original, and get the already-completed solution here!

    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.

    © BrainMass Inc. brainmass.com October 10, 2019, 3:00 am ad1c9bdddf
    https://brainmass.com/engineering/electrical-engineering/pseudo-code-403355

    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 ...

    Solution Summary

    This posting writes the pseudocode for a program that does the following.

    $2.19