Ask your own question, for FREE!
Computer Science 14 Online
OpenStudy (anonymous):

write an algoritm to accept an integr and display its digits .continue the digit till the palindrome is not found.

OpenStudy (blurbendy):

what have you figured out so far?

OpenStudy (anonymous):

n = num; rev = 0; while (num > 0) { dig = num % 10; rev = rev * 10 + dig; num = num / 10; } If n == rev then num is a palindrome: cout << "Number " << (n == rev ? "IS" : "IS NOT") << " a palindrome" << endl

Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!
Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!