Saturday, September 22, 2018

Output Program

65. DECLARE SUB TEST (N $)
      CLS
      A$="KATHMANDU"
      CALL TEST (A$)
      CALL TEST ("BHAKTAPUR")
      END

     SUB TEST(N$)
     FOR C = 1 TO LEN (N$)
     PRINT LEFT$ (N$, C)
     NEXT C
     END SUB

OUTPUT

K
KA
KAT
KATH
KATHM
KATHMA
KATHMAN
KATHMAND
KATHMANDU
B
BH
BHA
BHAK
BHAKT
BHAKTA
BHAKTAP
BHAKTAPU
BHAKTAPUR


66. DECLARE SUB PATTERN (S$)
      CLS
      B$="PROGRAM"
      CALL PATTERN (B$)
      END

     SUB PATTERN (S$)
     H=LEN (S$)
     I=10
     FOR J=1 TO H STEP 2
     PRINT TAB (I); MID$(S$, J, H)
     H=H-2
     I=I+1
     NEXT J
     END SUB

OUTPUT

PROGRAM
   ROGRA
       OGR
          G



67. DECLARE FUNCTION OUTP$(A$())
      DIM A$(5)
      FOR I=1 TO 5
      READ A$(I)
      NEXT I
      DATA NETRA, NAVIN, SUSAN, GOPAL, SUNIL
      PRINT OUTP$(A$())
      END

      FUNCTION OUTP$(A$())
      SWAP A$(1), A$(2)
      SWAP A$(3), A$(4)
      FOR J=1 TO 5
      T$=T$+MID$(A$(J), J,1)
      NEXT J
      OUTP$=T$
      END FUNCTION

OUTPUT

NEPAL


■○♡♡♢¿■  THE END  ¡¡¡♢♧☆☆▪¤

No comments:

Post a Comment