#include using namespace std; bool isPrime(int n) { if (n <= 1) return false; for (int i = 2; i <= n / i; i++) if (n % i == 0) return false; return true; } bool Ischun_Prime(int n) { int count = 0; for (int i = 4; i >= 1; i--) { n %= (int) pow(10, i); if (isPrime(n)) count++; } if (count == 4) return true; return false; } int main() { for (int i = 2; i < 100; i++) if (Ischun_Prime(i)) cout << i << endl; return 0; }