SHARE
TWEET

Untitled

a guest Jan 22nd, 2020 64 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.  
  2. int fromCharToInt(char arr[])
  3. {
  4.     int size = getLength(arr);
  5.     int number = 0;
  6.     int pow = size - 1;
  7.  
  8.     for (int i = 0; i < size; i++)
  9.     {
  10.         number = (arr[i] - '0') * Pow(10, pow--);
  11.     }
  12.     return number;
  13. }
  14.  
  15. int Pow(int num, int pow)
  16. {
  17.     int result = 1;
  18.  
  19.     for (int i = 0; i < pow; i++) {
  20.         result *= num;
  21.     }
  22.  
  23.     return result;
  24. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Top