A palindrome is a word which can be written in reversed order and it retains its meaning and spelling,Examples are lawal,ada,abba,etc
Write a simple QBASIC instruction that will accept a word from the keyboard and check if it is a palindrome or not. The palindrome must display a message showing if the word is palindrome or not.
CLS
INPUT-ENTERANY:";S$
For l =LEN(S$) TO 1STEP-1
B$=MID$(S$,L,1)
W$=W$+B$
Next l
IF S$=W$ THEN
PRINT " it is palindrome"
ELSE
PRINT "It is not palindrome
END IF
END
Contributions ({{ comment_count }})
Please wait...
Modal title
Report
Block User
{{ feedback_modal_data.title }}