I already wrote the part of the program that reverses the number:
int n = 0;
n = Convert.ToInt32(textBox1.Text);
double l = n;
double reverse = 0;
while (left > 0)
{
double r = left % 10;
reverse = reverse * 10 + r;
l = l / 10;
}
double final = n + rev;
However, if the final double does is not a palindrome, I want the program to add the final to its palindrome, and keep doing that until the a palindrome is found. The problem is in the the conditional statement.What condition should I give to the if statement?