OUTPUT |
CLS
X$ = "COMPUTER"
FOR i = 1 TO LEN(X$)
PRINT RIGHT$(X$, i)
NEXT i
END
X$ = "COMPUTER"
FOR i = 1 TO LEN(X$)
PRINT RIGHT$(X$, i)
NEXT i
END
Using SUB Procedure
DECLARE SUB pattern(a$)
CLS
x$ = "COMPUTER"
CALL pattern(x$)
END
SUB pattern (a$)
FOR i = 1 TO LEN(a$)
PRINT RIGHT$(a$, i)
NEXT i
END SUB
CLS
x$ = "COMPUTER"
CALL pattern(x$)
END
SUB pattern (a$)
FOR i = 1 TO LEN(a$)
PRINT RIGHT$(a$, i)
NEXT i
END SUB
Using FUNCTION Procedure
DECLARE FUNCTION pattern()
CLS
d = pattern
END
FUNCTION pattern
a$ = "COMPUTER"
FOR i = 1 TO LEN(a$)
PRINT RIGHT$(a$, i)
NEXT i
END FUNCTION
CLS
d = pattern
END
FUNCTION pattern
a$ = "COMPUTER"
FOR i = 1 TO LEN(a$)
PRINT RIGHT$(a$, i)
NEXT i
END FUNCTION
No comments:
Post a Comment
If you have any doubts, Please let me know.