调用函数可参https://bbs.csdn.net/topics/399166273 求助C语言的问题,逆序素数对的_编程语言-CSDN问答
void 两数相加是偶数且两数平方相加是回文数且为质数()
{//缘由https://ask.csdn.net/questions/7415867?spm=1005.2025.3001.5141int a = 2, aa = 2, aaa = 0;std::cin >> aaa;while (a < aaa)if (质数判断(a))if (质数判断(aa) && (a * a + aa * aa) == 反转数(a * a + aa * aa) &&!((a + aa) % 2))std::cout << a << ends << aa<< ends << (a * a + aa * aa) << endl,(aa % 2 ? aa += 2 : ++aa);elseif ((aa += 2) > aaa)(a % 2 ? a += 2 : ++a), aa = a; else;else(a % 2 ? a += 2 : ++a), aa = a;
}