Show Para
Note: Answer questions 71 and 72 based on the following algorithm.
START
$ STR := ’ ’ , $ ASTR := ‘a’,
$ BSTR : = ‘b’
WHILE LENGTH ($ STR) < 100
INPUT OPTION AS 1 OR 2
READ OPTION INTO$ OPT
IF ($ OPT = 1) THEN
APPEND$ ASTR IN THE BEGINNING OF $ STR
APPEND$ BSTR IN THE END OF $ STR
END IF
IF ($ OPT = 2) THEN
APPEND COPY OF$ STR AT THE END OF $ STR
ENDWHILE
OUTPUT$ STR
END
START
WHILE LENGTH (
INPUT OPTION AS 1 OR 2
READ OPTION INTO
IF (
APPEND
APPEND
END IF
IF (
APPEND COPY OF
ENDWHILE
OUTPUT
END
© examsnet.com
Question : 72
Total: 75
Go to Question: