logo CodeStepByStep logo

digitExpressions

Language/Type: Java basics mod variables

Suppose you have an int variable called number. What Java expression produces the second-to-last digit of the number (the 10s place)? What expression produces the third-to-last digit of the number (the 100s place)? (Note: Our code checker won't match every possible expression; please come up with the simplest expression using division and modulus.)

10s place
100s place

You must log in before you can solve this problem.

Log In

Need help?

Stuck on an exercise? Contact your TA or instructor.

If something seems wrong with our site, please

Is there a problem? Contact us.