CLS
FOR i = 1 TO 5
FOR j = 1 TO i
PRINT j;
FOR i = 1 TO 5
FOR j = 1 TO i
PRINT j;
NEXT j
PRINT
NEXT i
END
NEXT i
END
Print Pattern Using SUB Procedure
DECLARE SUB pattern()
CLS
CALL pattern
END
SUB pattern
FOR i = 1 TO 5
FOR j = 1 TO i
CLS
CALL pattern
END
SUB pattern
FOR i = 1 TO 5
FOR j = 1 TO i
PRINT j;
NEXT j
PRINT
NEXT i
END SUB
NEXT i
END SUB
Print Pattern Using FUNCTION Procedure
DECLARE FUNCTION pattern()
CLS
p = pattern
END
FUNCTION pattern
FOR i = 1 TO 5
FOR j = 1 TO i
CLS
p = pattern
END
FUNCTION pattern
FOR i = 1 TO 5
FOR j = 1 TO i
PRINT j;
NEXT j
PRINT
NEXT i
END FUNCTION
END FUNCTION
No comments:
Post a Comment
If you have any doubts, Please let me know.