The program (c code) gets a minimum and maximum value from the user to then determine whether all of the numbers in between are prime or not. If the number is not prime, the program must also tell the user one set of factors of that number. I'm having trouble determining how to work the for loops and then determine what the factors are. My programming knowledge is not very good, so the simple terms would be helpful. Any help is greatly appreciated.
int min, max, i, d, is_prime, not_prime;
void flag(int *is_prime, int *not_prime);
int main() {
int min, max, i, d, is_prime, not_prime;
printf("The program will calculate all prime numbers in the range n");
printf("Please enter a value for the start value\n");
scanf("%d", &min);
printf("Please enter a value for the end value\n");
scanf("%d", &max);
for(i=min; i<=max; i++) {
for(d=2; d<i<10; d++) {
if (d % i ==0) { (flag==1); } }