Write a program to input two digit number and check whether that number is palindrome or not using if else if
Answers
Explanation:
Check Palindrome for 3 Digit Number
The statement a=a/10 removes the last digit. The variable b holds the middle digit of the three digit number. And the variable c holds the first digit of the number. If the last digit is equal to the first digit then the number is palindrome, otherwise not.
Hope it's help you please mark me as brainliest pleaseeeee
Answer:
Note: I am using C++ programming language.
Code:
#include<iostream>
using namespace std;
int main () {
int a,b,num ;
cout<<"Enter a two digit number(10 - 99): " ;
cin>>num ;
a = num/10;
b = num%10;
if(a==b) {
cout<<"\nThe number " <<num<<" is a palindrome number." ;
}
else
cout<<"\nThe number " <<num<<" is not a palindrome number." ;
return 0;
}
Please mark this answer as Brainliest answer. Thank you!