Shaker AlSalem

Shaker AlSalem

  • NA
  • 25
  • 17.9k

Trying to figure out a method

Feb 21 2012 8:57 PM
 A palindrome is a number or a text phrase that reads the same backwards as forwards. 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.] Note: Although this exercise talks about a five digit number, think about any length for the number.

im not sure whats the method required here, im guessing it has to be divided by 10 or something, but how do you apply that on C#.
Thanks!

Answers (3)