To generate the pattern 12345 1234 123 12 1 (Qbasic Code)

To generate the pattern
12345
1234
123
12
1
  • FOR i = 5 TO 1 STEP -1
        FOR j = 1 TO i
            PRINT j;
        NEXT j
        PRINT
    NEXT i
    END

Share :

Twitter
Back To Top

facebook main

counter

Powered by Blogger.