View Single Post
  #2 (permalink)  
Old 10-12-2008, 06:52 AM
Fubarable's Avatar
Fubarable Fubarable is offline
Senior Member
 
Join Date: Jun 2008
Posts: 1,275
Fubarable is on a distinguished road
There are two ways to approach this question.
A) Convert the int into a String and manipulate the String chars using the String method charAt(int i).
B) Mathematically isolate your tens and ones digits and all the digits from the hundreds on up. This is probably what your teacher wants you to do. To do this, look up "integer division" and also the modulus operator. HTH.
Reply With Quote