Home  |  IT Zone  | Practice ZoneTips / Tricks  |  Did You Know  |  Inspirational  |  Health  |  Insurance  |  Universities  |  Forex  |  Mathematics  |  Illusions  |  Children Day Quotes  |  Be Aware  |  Articles  | Funny Pics | Entertainment | Songs | Simple Joys of Life |

To display the pattern. 123454321 1234321 12321 121 1 (Qbasic Code)

To display the pattern.
 123454321
 1234321
 12321
 121
 1

Using FOR ..... NEXT 
  • CLS
    a# = 11111
    FOR i = 1 TO 5
        PRINT a# * a#
        a# = a# \ 10
    NEXT i
    END

Using WHILE ..... WEND
  • CLS
    A# = 11111
    WHILE A# <> 0
        PRINT A# * A#
        A# = A# \ 10
    WEND
    END
OR

  • CLS
    a# = 11111
    c = 1
    WHILE c <= 5
        PRINT a# * a#
        a# = a# \ 10
        c = c + 1
    WEND
    END

Share :

X
Back To Top

facebook main

Powered by Blogger.