Advertisement
STANAANDREY

ith digit

Jul 25th, 2024
239
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.08 KB | None | 0 0
  1. int getIthDigit(int x, int i) {
  2.     return (int)(x / round(pow(10, i))) % 10;
  3. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement