To display the pattern. CO OM MP PU UT TE ER (Qbasic Code)

To display the pattern.
CO
   OM
      MP
          PU
             UT
                 TE
                    ER
  • CLS
    a$ = "COMPUTER"
    x = LEN(a$)
    FOR i = 1 TO x - 1
        PRINT TAB(i); MID$(a$, i, 2)
    NEXT i
    END

Share :

Twitter
Back To Top

facebook main

counter

Powered by Blogger.