To display the pattern. 1 10 101 1010 10101 (Qbasic Code)

To display the pattern.
1
10
101
1010
10101

  •  CLS
    FOR i = 1 TO 5
        FOR j = 1 TO i
            x = j MOD 2
            PRINT x;
        NEXT j
        PRINT
    NEXT i
    END

Share :

Facebook Twitter Google+
Back To Top

facebook main

counter

Powered by Blogger.