Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- int main()
- {
- int x, y, c, k = 1, xx = 0, yy = 0, ogl = 0;
- cin >> x >> y;
- while (x != 0)
- {
- c = x % 10;
- if (c % 2 == 1)
- {
- xx = xx + c * k;
- k = k * 10;
- }
- x = x / 10;
- }
- k = 1;
- while (y != 0)
- {
- c = y % 10;
- if (c % 2 == 1)
- {
- yy = yy + c * k;
- k = k * 10;
- }
- y = y / 10;
- }
- while (xx != 0)
- {
- ogl = ogl * 10 + xx % 10;
- xx = xx / 10;
- }
- if (ogl == yy && ogl != 0)
- cout << "DA";
- else
- cout << "NU";
- return 0;
- }
Add Comment
Please, Sign In to add comment