Skip to content

Commit 243cf8d

Browse files
Create Palindrome-checker.sh
1 parent 738bfda commit 243cf8d

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

Palindrome-checker.sh

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
read palindrome
2+
reverse=$( echo $palindrome | rev )
3+
if [ $palindrome = $reverse ]; then 
4+
echo "The number you provided is a palindrome."
5+
else
6+
echo "The number you provided is not a palindrome."
7+
fi

0 commit comments

Comments
 (0)