I want palindrome programm
Answers
Answered by
3
C Program to Check Whether a Number is Palindrome or Not. This program reverses an integer (entered by the user) using while loop. Then, if statement is used to check whether the reversed number is equal to the original number or not. ... C Programming Operators. C if...else Statement. I hope that you liked my answer and plz make me the brainlist
Answered by
1
class PalindromeExample{
public static void main(String args[]){
int r,sum=0,temp;
int n
temp=n;
while(n>0){
r=n%10; //getting remainder
sum=(sum*10)+r;
n=n/10;
}
if(temp==sum)
System.out.println("palindrome number ");
else
System.out.println("not palindrome");
}
}
Similar questions