Programming Concept
QBASIC:
1)NEPAL :::: CLS
NEPA A$="NEPAL"
NEP FOR I =LEN(A$) TO 1 STEP-1
NE PRINT LEFT$(A$,I)
N NEXT I
END
2) L :::: CLS
AL A$="NEPAL"
PAL FOR I = 1 TO LEN(A$)
EPAL PRINT RIGHT$(A$,I)
NEPAL NEXT I
END
3)E :::: CLS
ME A$=''WELCOME''
OME FOR I = 1 TO LEN(A$)
COME PRINT RIGHT$(A$,I)
LCOME NEXT I
ELCOME END
WELCOME
4)WELCOME :::: CLS
ELCOME A$="WELCOME"
LCOME FOR I =LEN(A$) TO 1 STEP-1
COME PRINT RIGHT$(A$,I)
OME NEXT I
ME END
5)P :::: CLS
EPA A$=''NEPAL''
NEPAL B=3
FOR I= 1 TO LEN(A$) STEP 2
PRINT MID$(A$,B,I)
B=B-1
NEXT I
END
6)C :::: CLS
CO A$=''COMPUTER''
COM FOR I=1 TO LEN(A$)
COMP LEFT$(A$,I)
COMPU NEXT I
COMPUT END
COMPUTE
COMPUTER
7)KATHMANDU :::: CLS
KATHMAND A$=''KATHMANDU''
KATHMAN FOR I= LEN(A$) TO 1 STEP-1
KATHMA PRINT LEFT$(A$,I)
KATHM NEXT I
KATH END
KAT
KA
K
8)M :::: CLS
HMA A$=''KATHMANDU''
THMAN B=5
ATHMAND FOR I=1 TO LEN(A$) STEP 2
KATHMANDU PRINT MID$(A$,B,I)
B=B-1
NEXT I
END
9)* :::: CLS
** A$=''*****''
*** FOR I=1 TO LEN(A$)
**** PRINT LETF$(A$,I)
***** NEXT I
END
11)* :::: CLS
*** A$=''*********''
***** FOR I=1 TO LEN(A$) STEP 2
******* PRINT LEFT$(A$,I)
********* NEXT I
END
12)*NEPAL* :::: CLS
*NEPA* A$=''NEPAL''
*NEP* FOR I=LEN(A$) TO 1 STEP -1
*NE* PRINT ''*'' ; LEFT$(A$,I) ; "*"
*N* NEXT I
END
13)*N* :::: CLS
*NE* A$=''NEPAL''
*NEP* FOR I=1 TO LEN(A$)
*NEPA* PRINT ''*'' ; LEFT$(A$,I) ; "*"
*NEPAL* NEXT I
END
14) *NEPAL* :::: CLS
**NEPAL** A$=''*****''
***NEPAL*** FOR I=1 TO LEN(A$)
****NEPAL**** PRINT LEFT$(A$,I) ; ''NEPAL'' ; LEFT$(A$,I)
*****NEPAL***** NEXT I
END
Comments
Post a Comment