Write a program to display whether the given string is a Palindrome. Example-level
Answers
Answered by
1
CLS
INPUT "Enter a string ";A$
B$ = UCASE$(A$)
FOR I = LEN(B$) TO 1 Step -1
C$ = C$ + MID$(B$,I,1)
NEXT I
IF C$=B$ THEN
PRINT "The string is palindrome"
ELSE
PRINT "It is not palindrome"
END IF
END
This program is for QBASIC. If it was useful, please mark me as brainliest.
INPUT "Enter a string ";A$
B$ = UCASE$(A$)
FOR I = LEN(B$) TO 1 Step -1
C$ = C$ + MID$(B$,I,1)
NEXT I
IF C$=B$ THEN
PRINT "The string is palindrome"
ELSE
PRINT "It is not palindrome"
END IF
END
This program is for QBASIC. If it was useful, please mark me as brainliest.
Similar questions