Examine the pseudocode that follows the introductory


"Looping (Part 1)"

Design the logic by drawing a flowchart and writing pseudocode for a program that outputs every number from 1 through 20.

"Looping (Part 2)"

Examine the pseudocode that follows the introductory comments, then find and correct all the bugs. Correct all bugs in the file and be sure to clearly highlight the corrections.

1. Debugging

This program should display every fifth year starting with 2015, e.g., 2015, 2020, 2025, and so on for 30 years.

start
Declarations
num year
num START_YEAR = 2015
num FACTOR = 5
num END_YEAR = 30
year = START_YEAR
while year <= END_YEAR
output year
endwhile
stop

2. Debugging

This program displays every combination of three-digits.

start
Declarations
num digit1 = 0
num digit2 = 0
num digit3 = 0
while digit1 <= 9
while digit2 <= 9
while digit3 <= 9
output digit1, digit2, digit3
digit1 = digit1 + 1
endwhile
digit2 = digit2 + 1
endwhile
digit3 = digit3 + 1
endwhile
stop

Solution Preview :

Prepared by a verified Expert
Basic Computer Science: Examine the pseudocode that follows the introductory
Reference No:- TGS01227232

Now Priced at $10 (50% Discount)

Recommended (90%)

Rated (4.3/5)