Can anybody give me the answer to the question? Please make it a simple one 🙏
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people's questions, and connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Krishna Vijayan
num
=
int
(
input
(
"Enter The Number:"
))
temp
=
num
rev
=
0
while
(num>
0
):
dig
=
num
%
10
rev
=
rev
*
10
+
dig
num
=
num
/
/
10
if
(temp
=
=
rev):
print
(
"The Number Is A Palindrome"
)
else
:
print
(
"The Number Is Not A Palindrome"
)
Hope This Helped 🙏
shiv
*Using while loop:
2
3
4
5
6
7
8
9
10
11
num
=
int
(
input
(
"Enter a number:"
))
temp
=
num
rev
=
0
while
(num>
0
):
dig
=
num
%
10
rev
=
rev
*
10
+
dig
num
=
num
/
/
10
if
(temp
=
=
rev):
print
(
"The number is palindrome!"
)
else
:
print
(
"Not a palindrome!"
)