Write a program to determine if a number is a palindrome.

AnswerBot
2y
Program to check if a number is palindrome or not.
Convert the number to a string
Reverse the string
Compare the reversed string with the original string
If they are equal, the number is a palindrome
kunal roy
1y
def palindrome(number): return number == number[::-1] number = input("Enetr your number :") if palindrome(number): print(f"{number} is a palindromic number!!!") else: print(f"{number} oops!!! it is no...read more

PrepInsta
author
3y
#include using namespace std; //main Program int main() { int num, digit, reverse = 0; cout << "Enter a positive integer: "; //user input cin >> num; int temp = num; //loop to find reverse while(num!=...read more
Add answer anonymously...
TCS Assistant System Engineer Trainee interview questions & answers
An Assistant System Engineer Trainee was asked 2w agoQ. What is exception handling?
An Assistant System Engineer Trainee was asked 2w agoQ. What is OOPS and what are its pillars?
An Assistant System Engineer Trainee was asked 1mo agoQ. What is the method to count the number of words in a given string?
Popular interview questions of Assistant System Engineer Trainee
An Assistant System Engineer Trainee was asked 1w agoQ1. Explain OOP concepts.
An Assistant System Engineer Trainee was asked 2w agoQ2. What is exception handling?
An Assistant System Engineer Trainee was asked 2w agoQ3. What is OOPS and what are its pillars?
Top HR questions asked in TCS Assistant System Engineer Trainee
An Assistant System Engineer Trainee was asked 1mo agoQ1. What will you do if you encounter any problem?
An Assistant System Engineer Trainee was asked 3mo agoQ2. Can you provide a brief introduction about yourself?
An Assistant System Engineer Trainee was asked 5mo agoQ3. Are you open to relocating for this position?
Stay ahead in your career. Get AmbitionBox app


Trusted by over 1.5 Crore job seekers to find their right fit company
80 L+
Reviews
10L+
Interviews
4 Cr+
Salaries
1.5 Cr+
Users
Contribute to help millions
AmbitionBox Awards
Get AmbitionBox app

