โ Back to Variables
Question 265
Last Digit of a Number
Last Digit of a Number
Declareint number = 3742. Use the modulo operator%to find its last digit, store it inlastDigit, then print it: 2
Expected Output:
2
Topics:
Variables
Code Editor
1
Tab to indent ยท Ctrl+Enter to run ยท 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.