Question: If I have an array the following array ListArray [15] 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 What logic do I need to take input from a keyboard to populate this

If I have an array the following array ListArray [15] 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0

What logic do I need to take input from a keyboard to populate this array?

I do not want code , I simply want the logic that needs to be followed.

This is not from a specific language, this question is from a conceptual Programming Logic and Design. We have to provide the pseudocode that shows the logic needed. similar to this pseudocode

//Simulate lift operations

WHILE floor >= 0 AND floor <= 25 THEN

//Display floor number

OUTPUT(Floor No: + floor)

//Display UP and DOWN buttons

IF floor == 0 Then

OUTPUT(UP)

ELSE IF floor == 25 THEN

OUTPUT(UP | DOWN)

ELSE

OUTPUT(DOWN)

ENDIF

//Move to the next floor depending on the button pressed

IF UP THEN

floor = floor + 1

ELSE IF DOWN THEN

floor = floor - 1

ENDIF

ENDWHILE

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!