hoe to find the prime number in c program using if statement code example
Example: prime number c program
int isPrime(int n) {
for (int i = 2; i < n; i++) if (n % i == 0) return 0;
return 1;
}
int isPrime(int n) {
for (int i = 2; i < n; i++) if (n % i == 0) return 0;
return 1;
}