#include #include // A function that checks whether a number is prime or not int isPrime(int num) { if (num < 2) { return false; } for (int i = 2; i * i <= num; i++) { if (num % i == 0) { return false; } } return true; } int main() { // Find prime numbers starting with 5 and having 3 digits for (int sayi = 500; sayi <= 599; sayi++) { if (sayi % 10 == 3 || sayi % 10 == 7) { if (isPrime(sayi)) { printf("%d\n", sayi); } } } return 0; }