Ask Question
19 April, 18:32

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) ?

+5
Answers (1)
  1. 19 April, 22:01
    0
    Private int number = 123;

    / / using this number "123"

    int hundred = (number % 10); / / gets third to last

    number / = 10;

    int tenth = (number % 10); / / gets second to last

    number/=10;

    int ones = (number % 10); / / first digit
Know the Answer?
Not Sure About the Answer?
Get an answer to your question ✅ “Suppose you have an int variable called number. what java expression produces the second-to-last digit of the number (the 10s place) ? what ...” in 📙 Computers & Technology if there is no answer or all answers are wrong, use a search bar and try to find the answer among similar questions.
Search for Other Answers