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