To generate the given pattern using SUB Procedure
C
CO
COM
COMP
COMPU
COMPUT
COMPUTE
COMPUTER
C
CO
COM
COMP
COMPU
COMPUT
COMPUTE
COMPUTER
- DECLARE SUB pattern (a$)
CLS
CALL pattern(a$)
END
SUB pattern (a$)
LET a$ = "COMPUTER"
FOR i = 1 TO LEN(a$)
PRINT LEFT$(a$, i)
NEXT i
END SUB