Assignment for class IX

WAP to Display:

1.           
              J
           JA
           JAG
           JAGA
           JAGAT
Ans à
REM
CLS
S$=”JAGAT”
FOR I=1 TO LEN(S$)
             PRINT LEFT$(S$, I)                      
NEXT I
END

2.   
           T
           AT
GAT
AGAT
JAGAT
Ans à
REM
CLS
S$=”JAGAT”
FOR I=1 TO LEN(S$)
PRINT RIGHT$(S$,I)
NEXT I
END

3.
JAGAT
JAGA
JAG
JA
J
Ans à
REM
CLS
S$=”JAGAT”
FOR I=LEN(S$) TO 1 STEP-1
PRINT RIGHT$(S$, I)
NEXT I
END

4.
           JAGAT
           AGAT
           GAT
            AT
            T
Ans à
           
REM
CLS
S$=”JAGAT”
FOR I= LEN(S$) TO 1 STEP-1
PRINT RIGHT$(S$, I)
NEXT I
END


5.
J
A
G
A
T
Ans à
REM
CLS
S$=”JAGAT”
FOR I=1 TO LEN(S$)
PRINT MID$(S$, I, 1)
NEXT I
END

6.
T
A
G
A
J
Ans à
REM
CLS
S$=”JAGAT”
FOR I=LEN(S$) TO 1 STEP-1
PRINT MID$(S$, I, 1)
NEXT I
END

7.
JAGAT
AGA
G
Ans à
REM
CLS
S$=”JAGAT”
A=5
FOR I=1 TO 3
PRINT MID$(S$, I, A)
A=A-2
NEXT I
END




8.
G
AGA
JAGAT
Ans à
 REM
CLS
S$=”JAGAT”
A=1
FOR I=3 TO 1 step-1
PRINT MID$(S$, I, A)
A=A+2
NEXT I
END



9.
*
**
           ***
****
*****
Ans à
REM
CLS
S$=”*****”
FOR I=1 TO LEN(S$)
PRINT LEFT$(S$, I)
NEXT I
END

10.
*****
****
***
**
*
Ans à
REM
CLS
S$=”*****”
FOR I=LEN(S$) TO 1 STEP-1
PRINT LEFT$(S$, 1)
NEXT I

END

Comments

Popular posts from this blog

Assignment for class IX (part iii)

MADAM CURIE

Assignment for class IX (part ii)