1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
madam [21]
3 years ago
15

Suppose you have an int variable called number. What Java expression produces the second-to-last digit of the number (the 10s pl

ace)?
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
Computers and Technology
1 answer:
kobusy [5.1K]3 years ago
4 0

Answer:

int second_to_last = (number/10)%10;

int third_to_last = (number/100)%10;

Explanation:

The first expression int second_to_last = (number/10)%10; first divide the number by ten and then get modulus by dividing by ten again which will then give the second to last digit.

Assuming number is 146 the second to last digit will be 4.

for the second expression int third_to_last = (number/100)%10; first divide the number by hundred and then get modulus by dividing by ten which will then give the third to last digit.

Assuming number is 4368 the third to last digit will be 3.

You might be interested in
What happens to a mechanical system when two opposing torques do not cancel out?
const2013 [10]
The system will move in the direction of the stronger torque
5 0
3 years ago
When conducting research on the internet, what is a starting point for determining how to start the research?
Alex787 [66]
It depends on what you're researching for.
4 0
3 years ago
Computer science is a blank process
PSYCHO15rus [73]

i agree... its a interesting thing to learn, just like learning an actual new language.

4 0
2 years ago
Read 2 more answers
How do I send the face to the back? Seriously, I can't find out how...
makvit [3.9K]

Answer:

i think you can layer it :)

Explanation:

nice drawing btw!

8 0
3 years ago
What was the #1 song in 1987 and who was the artist
Veronika [31]
Billboard magazine said it was "Walk Like an Egyptian" by The Bangles.
8 0
3 years ago
Read 2 more answers
Other questions:
  • Computer is created by aliens?!
    14·1 answer
  • Which agency coordinate the Internet's IP addressing and DNS system.
    15·1 answer
  • Software that translates the sound of human voice into text is called:________.
    14·1 answer
  • Write a program that receives an character and displays its Unicode. Here is a sample run: Enter an character: E The Unicode for
    8·1 answer
  • Kyle wants to access his school’s home page. How can he do this?
    8·2 answers
  • What type of memory or storage device is prone to losing data if the power goes out?
    5·1 answer
  • Ew<br>subject: Computer<br>11101÷101<br> binary operations<br>​
    7·1 answer
  • Take the MBTI test and research information about this tool. Several websites have different versions of the test, including www
    5·1 answer
  • The symbol located to the left of a code number that identifies a code description that has been revised is _____.
    12·1 answer
  • 5 efectos del desarrollo tecnológico en el medio ambiente
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!