CJCoding With Joseph

Last Digit of a Number

Declare int number = 3742. Use the modulo operator % to find its last digit, store it in lastDigit, 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.