Ask Question
31 January, 09:16

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

+1
Answers (1)
  1. 31 January, 11:04
    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?
Find 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 and Technology if you're in doubt about the correctness of the answers or there's no answer, then try to use the smart search and find answers to the similar questions.
Search for Other Answers