|
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.
|