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 :

Facebook Twitter Google+
Back To Top

facebook main

counter

Powered by Blogger.