QBASIC PATTERN : 54321,4321,321,21,1
54321 4321 321 21 1
CLS
FOR I = 5 TO 1 STEP -1
FOR J = I TO 1 STEP -1
PRINT J;
NEXT J
PRINT
NEXT I
END
USING SUB
DECLARE SUB PATTERN()
CLS
CALL PATTERN
END
SUB PATTERN
FOR I = 5 TO 1 STEP -1
FOR J = I TO 1 STEP -1
PRINT J;
NEXT J
PRINT
NEXT I
END SUB
0 Comments