Wednesday, August 10, 2011

C++ help. homework question and i am stumped! can you solve this question?

Since our teacher isnt what ya would call a teacher, rather a give you something an just figure it out, i am stumped on this because she has never even tought us this yet. so could someone solve it so i can use it as a reference? A palindrome is a number or a text phrase that reads the same backward as forward. For example, each of the following five-digit integers is a palindrome: 12321, 55555, 45554 and 11611. Write a program that reads in a five-digit integer and determines whether it is a palindrome. [ Hint:Use the division and modulus operators to separate the number into its individual digits.]

No comments:

Post a Comment