DECLARE FUNCTION REVERSE$ (WORD$)
CLS
INPUT"ENTER A WORD"; WORD$
PRINT"THE REVERSE"; REVERSE$ (WORD$)
END
FUNCTION REVERSE$ (WORD$)
FOR I = LEN (WORD$) TO 1 STEP -1
X$ = MID$ (WORD$,I,1)
B$ = B$ + X$
NEXT I
REVERSE$ = B$
END FUNCTION
Questions
Quick Access
Exam Capsule
MCQ
Articles
Institutes
Notices
Top Topics
Write a program using FUNCTION... END FUNCTION to get a word from the user then prints the word in reverse.
DECLARE FUNCTION REVERSE$ (WORD$)
CLS
INPUT"ENTER A WORD"; WORD$
PRINT"THE REVERSE"; REVERSE$ (WORD$)
END
FUNCTION REVERSE$ (WORD$)
FOR I = LEN (WORD$) TO 1 STEP -1
X$ = MID$ (WORD$,I,1)
B$ = B$ + X$
NEXT I
REVERSE$ = B$
END FUNCTION
Who is a system analyst? What are the characteristics of system analysts? 1
What are the different stages of the system development life cycle (SDLC) 1
What do you understand about AI? What are the negative and positive aspects of AI in society? 1
How does an AI application work? Can a computer really think with the aid of AI? 1
PathshalaNepal.com is a Registered Company of E. Pathshala Pvt Ltd Nepal. Registration number : 289280
© 2020. All right Reversed.E. Pathshala Pvt Ltd