December 28, 2016

REM to ask full name from user and displays only last name:
CLS
INPUT "Enter your full name using commas instead of spaces:", a$, b$, c$
PRINT "Your last name is:", c$
END

or,

CLS
INPUT "Enter your full name:  ", N$
INPUT "Enter your caste digit:(eg. Rai=3): ", D
A = LEN(N$) - D
FOR I = 1 TO D
A = A + 1
C$ = C$ + MID$(N$, A, 1)
NEXT I
PRINT
PRINT "Your caste is:", UCASE$(C$)
END

No comments:

Post a Comment

Note: Only a member of this blog may post a comment.