hopingsteam

Untitled

Apr 4th, 2020
222
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. int APa[10], APb[10];
  2. bool iiFrate(unsigned int a, unsigned int b)
  3. {
  4.     while(a)
  5.     {
  6.         int c = a % 10;
  7.         APa[c]++;
  8.         a = a / 10;
  9.     }
  10.     while(b)
  11.     {
  12.         int c = b % 10;
  13.         APb[c]++;
  14.         b = b / 10;
  15.     }
  16.     int contor = 0;
  17.     for(int i = 0; i <= 9; i++)
  18.         if(APa[i] != 0 && APb[i] != 0)
  19.             contor++;
  20.     if(contor >= 2)
  21.         return true;
  22.     else
  23.         return false;
  24. }
RAW Paste Data