Professional Documents
Culture Documents
BSCS-2A
An elevator remains positioned at the ground floor level of a building with the
doors shut whenever it is not in use. When a call button is pressed on any
floor, the lift moves to the required floor and the elevator doors open. Write
an algorithm to express the logic of controlling the lift.
Pseudocode Flowchart
IF
END IF
END
END MAINPROGRAM
Since the elevator problem has two possible paths depending on whether or not the
call button was pressed, I used the Binary Selection solution structure.