Simple Program
1234567891011CLS
s$ = "NEPAL"
r = 1
t = 10
FOR i = 5 TO 1 STEP -2
PRINT TAB(t); MID$(s$, r, i)
r = r + 2
t = t + 2
NEXT i
END
by using SUB END SUB
12345678910111213141516DECLARE SUB pat(a$)
CLS
a$ = "NEPAL"
CALL pat(a$)
END
SUB pat (s$)
r = 1
t = 10
FOR i = 5 TO 1 STEP -2
PRINT TAB(t); MID$(s$, r, i)
r = r + 2
t = t + 2
NEXT i
END SUB
by Using FUNCTION END FUNCTION
1234567891011121314151617DECLARE FUNCTION pat$(a$)
CLS
a$ = "NEPAL"
p$ = pat$(a$)
END
pat$ (s$)
a$ = "NEPAL"
r = 1
t = 10
FOR i = 5 TO 1 STEP -2
PRINT TAB(t); MID$(s$, r, i)
r = r + 2
t = t + 2
NEXT i
END FUNCTION
Post a Comment
Click to see the code!
To insert emoticon you must added at least one space before the code.