SHARE
TWEET

Untitled

a guest Jan 22nd, 2020 71 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #include <iostream>
  2. using namespace std;
  3. bool isEqual(int x, int y)
  4. {
  5.     if (x == y) return true;
  6.     if (x == 0) return false;
  7.     if (x % 10 == y % 10) isEqual(x / 10, y / 10);
  8.     else isEqual(x / 10,y);
  9. }
  10. int main()
  11. {
  12.     int x = 1025;
  13.     int y = 125;
  14.     cout << isEqual(x, y);
  15.     return 0;
  16. }
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