View Single Post
  #1 (permalink)  
Old 10-12-2008, 06:06 AM
yadster101 yadster101 is offline
Member
 
Join Date: Oct 2008
Posts: 2
yadster101 is on a distinguished road
New to CompSci and Java
Hi i just started my CompSci class and for hw my teacher gave us the question:

"Write an expression that, given a positive integer n, computes a new integer
in which the units and tens digits have swapped places. For example, if
n = 123, the result should be 132; if n = 3, the tens digit is zero and the result should be 30."

Im not really sure how i would do this but my guess is that it is more of a math question than a java question. If you have any ideas that might help please let me know.
Reply With Quote
Sponsored Links