Question: 2.11.3: Integer division and modulo. Integer inputNum is read from input. Assume inputNum is greater than 1000 and less than 99999. Assign hundredsDigit with inputNum's
2.11.3: Integer division and modulo.
Integer inputNum is read from input. Assume inputNum is greater than 1000 and less than 99999. Assign hundredsDigit with inputNum's hundreds place value.
Ex: If the input is 17459, then the output is:
The value in the hundreds place is: 4
(HOW DO I GET THE CORRECT INPUT?)

View your last submission 4517543251002,9320777 Jump to level 1 Integer inputNum is read from input. Assume inputNum is greater than 1000 and less than 99999 . Assign hundredsDigit with inputNum's hundreds place value. Ex: If the input is 17459 , then the output is: The value in the hundreds place is: 4 1 3 Dividing a number by 100 shifts the number right two places, putting the hundreds digit in the ones place. Applying modulo 10 on a number gets the right-most digit from the number. To find the digit at the hundreds place of a number x,x is divided by 100 , and then applied with modulo 10. Ex: For input 17459, inputNum is assigned with 17459 . Then, 17459/100=174. Finally, 174%10=4. Not all tests passed
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
