To generate the given pattern C CO COM COMP COMPU COMPUT COMPUTE COMPUTER (Qbasic Code)

To generate the given pattern
C
CO
COM
COMP
COMPU
COMPUT
COMPUTE
COMPUTER

  • CLS
    LET a$ = "COMPUTER"
    FOR i = 1 TO LEN(a$)
        PRINT LEFT$(a$, i)
    NEXT i
    END
  • Using SUB Procedure (View)
  • Using FUNCTION Procedure (View)

Share :

Facebook Twitter Google+
Back To Top

facebook main

counter

Powered by Blogger.