QBASIC PATTERN : 13579 , 1357 , 135 , 13 , 1

QBASIC PATTERN : 13579 , 1357 , 135 , 13 , 1


13579 1357 135 13 5


CLS
 FOR I = 9 TO 1 STEP -2
 FOR J = 1 TO I STEP 2
 PRINT J;
 NEXT J
 PRINT
 NEXT I
 END

USING SUB


DECLARE SUB PATTERN()
 CLS
 CALL PATTERN
 END
 
 SUB PATTERN
 FOR I = 9 TO 1 STEP -2
 FOR J = 1 TO I STEP 2
 PRINT J;
 NEXT J
 PRINT
 NEXT I
 END SUB

Post a Comment

0 Comments