Last Digit
Computer Mathematics
Easy
2 views
Problem Description
Print the last digit of an integer n (as a non-negative digit).
Input Format
One integer n.
Output Format
One digit 0-9.
Official Solution
Take abs(n), then last digit is abs(n) % 10.
Solutions (0)
No solutions submitted yet. Be the first!
No comments yet. Start the discussion!