How can i get the last digit of an integer (or NSInteger) outputted to integer?
example:
int time = CFAbsoluteGetCurrent();
int lastDigit;
How can i get the last digit of an integer (or NSInteger) outputted to integer?
example:
int time = CFAbsoluteGetCurrent();
int lastDigit;
Use modulo:
int lastDigit = time % 10;
© 2022 - 2024 — McMap. All rights reserved.