Computer Notes, Programming codes, Hardware and Networking Tip, Entertainment, Biography, Internet Tip, Tech News, Latest Technology, YouTube,

QBASIC (Pattern Printing) 1, AA, 222, bbbb, 33333, cccccc

pattern print 1, AA, 222, bbbb, 33333, cccccc, pattern print 1 AA 222 bbbb 33333 cccccc, QBASIC, qbasic pattern printing program,

Pattern Type 
1
AA
222
bbbb
33333
cccccc


CLS
s$ = "1A2b3c"
FOR i = 1 TO LEN(s$)
    FOR j = 1 TO i
        PRINT MID$(s$, i, 1);
    NEXT j
    PRINT
NEXT i
END

Method 1: Using SUB END SUB
DECLARE SUB pattern(s$)
CLS
s$ = "1A2b3c"
CALL pattern(s$)
END


SUB pattern (s$)
    FOR i = 1 TO LEN(s$)
        FOR j = 1 TO i
            PRINT MID$(s$, i, 1);
        NEXT j
        PRINT
    NEXT i
END SUB

Method 1: Using FUNCTION END FUNCTION
DECLARE FUNCTION pattern$(s$)
CLS
r$ = pattern$(s$)
END


FUNCTION pattern$ (s$)
    s$ = "1A2b3c"
    FOR i = 1 TO LEN(s$)
        FOR j = 1 TO i
            PRINT MID$(s$, i, 1);
        NEXT j
        PRINT
    NEXT i
END FUNCTION

Click Here For More Patterns SET-1 in QBASIC Program

Click Here For More Patterns SET-2 in QBASIC Program


Post a Comment

MKRdezign

Contact Form

Name

Email *

Message *

Powered by Blogger.
Javascript DisablePlease Enable Javascript To See All Widget