Salut, imi puteti spune va rog care este problema in urmatorul cod?
#include
using namespace std;
int main() {
int a, cbd, org;
cin >> a;
org = a;
int i = 2;
int cmmdc = 1;
while (a != 0) {
cbd = cbd * 10 + a % 10;
a /= 10;
}
for (i = 2; i <= org/2 && i <= cbd/2; ++i) {
if ((org % i == 0 && cbd % i == 0) || (org % i != 0 && cbd % i == 0) || (org % i == 0 && cbd % i != 0))
cmmdc = 0;
}
if (cmmdc == 1) {
cout << "DA";
} else {
cout << "NU";
}
return 0;
}