int given_no = 656, final_rev_no = 0, temp = 0,initialno;
initialno = given_no;
while (given_no > 0)
{
temp = given_no % 10;
final_rev_no = final_rev_no * 10 + temp;
given_no /= 10;
}
if (final_rev_no == initialno)
lblmessgae.Text = "Given Number is Palindrome Number";//print your statement
else
lblmessgae.Text = "Given Number is not a Palindrome Number";//print your else statement
Tag: Palindrome, Palindrome in asp.net, Palindrome in c, Palindrome in c++, Palindrome in cpp, Palindrome logic, Palindrome program in c, Palindrome program in c#, Palindrome program in cpp
initialno = given_no;
while (given_no > 0)
{
temp = given_no % 10;
final_rev_no = final_rev_no * 10 + temp;
given_no /= 10;
}
if (final_rev_no == initialno)
lblmessgae.Text = "Given Number is Palindrome Number";//print your statement
else
lblmessgae.Text = "Given Number is not a Palindrome Number";//print your else statement
Tag: Palindrome, Palindrome in asp.net, Palindrome in c, Palindrome in c++, Palindrome in cpp, Palindrome logic, Palindrome program in c, Palindrome program in c#, Palindrome program in cpp
No comments:
Post a Comment