CLS
FOR i = 5 TO 1 STEP -1
FOR j = 1 TO i STEP 1
PRINT j;
NEXT j
PRINT
NEXT i
END
FOR i = 5 TO 1 STEP -1
FOR j = 1 TO i STEP 1
PRINT j;
NEXT j
NEXT i
END
Using SUB Procedure
DECLARE SUB pattern()
CLS
CALL pattern
END
SUB pattern
FOR i = 5 TO 1 STEP -1
FOR j = 1 TO i STEP 1
CLS
CALL pattern
END
SUB pattern
FOR i = 5 TO 1 STEP -1
FOR j = 1 TO i STEP 1
PRINT j;
NEXT j
PRINT
NEXT i
END SUB
END SUB
Using FUNCTION Procedure
DECLARE FUNCTION pattern()
CLS
p = pattern
END
FUNCTION pattern
FOR i = 5 TO 1 STEP -1
FOR j = 1 TO i STEP 1
CLS
p = pattern
END
FUNCTION pattern
FOR i = 5 TO 1 STEP -1
FOR j = 1 TO i STEP 1
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.