Last Digit of a Number
mediumQuestion 355Declare int number = 3742. Use the modulo operator % to find its last digit, store it in lastDigit, then print it (see Expected Output).
Expected output
2= newline. The output ends with a newline, so print one after the last line.
Hints2 available
Sign in to use hintsTopics
Variables
1
Tab to indent (Esc then Tab to move on) · Ctrl+Enter to run · Shift+Alt+F to format · Ctrl+Space to expand shortcuts (cw, cr, fori)
Your output
Run your code to see the output here...
Test cases
Run your code to see test case results.