Advertisement
Neveles

© 2020 Neveles. All rights reserved.

Apr 5th, 2020
296
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.11 KB | None | 0 0
  1. int takeDigit(int num, int digit)
  2. {
  3.   for (int i = 0; i < digit; i++)
  4.   {
  5.     num /= 10;
  6.   }
  7.   return num %= 10;
  8. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement