Question: Please show all work QUESTION 9: Below is a tiny computer program written in a made up language. Line numbers are added for easy identification;

 Please show all work QUESTION 9: Below is a tiny computer

Please show all work

QUESTION 9: Below is a tiny computer program written in a "made up" language. Line numbers are added for easy identification; they are not really a part of the program. O BEGIN PROGRAM 1DECLARE VARIABLE x AS INTEGER; 2 3 LET x = 1; 4 5 BEGIN LOOP 6 DISPLAY "Hi there!" ON SCREEN; 7 LET x = x + 3; 8 IF (x IS GREATER THAN OR EQUAL TO y) THEN EXIT LOOP; 9 CONTINUE LOOP 10 PRINT "We are done printing." TO SCREEN; 11 END PROGRAM DECLARE VARIABLE y AS INTEGER; 4 LET y 15; a) What control structure is illustrated by lines 5 through 9? b) What control structure is illustrated by line 8? c) When x is equal to 4, and we are at line 8, what happens next? Explain in detail d) When will the loop end? Explain in detail. e) How many times will "Hi there!" be displayed on the screen? (HINT: It will help to walk through the program - write down the current value of x and whether the message will be printed to the screen. Remember Line 3 sets the initial value of x, then at line 6 we display the message, then at line 7 we change the value of x)

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!