```
#include <stdio.h>

int prime(int num);

int main() {
    int upper, lower, tempL, x;

    printf("Enter lower limit:");
    scanf("%d", &lower);

    printf("Enter upper limit:");
    scanf("%d", &upper);

    for (lower; lower <= upper; lower + 2) {
        tempL = lower;
        for (lower; lower != 0; lower--) {
            if (prime(lower) == 0) { //after decrementing we find a prime
                x = tempL - (lower); x = the original lower limit minus the current decremented lower limit
                if (prime(x) == 0) { //if x if prime do following
                    printf("%d = %d + %d\n", tempL, lower, x); //print
                    break;
                }
            }
        }
    }
}

int prime(int number) { //returns 0 if number is prime
    int i;
    for (i = 2; i < number / 2; i++) {
        if (number % i == 0) {
            return 1;
        }
    }
    return 0;
}

```

This is what I have so far... all it does is endlessly print 

```
999983 = 999983 + 0

```

I really am stuck here. I have been trying to get this for the past 8 hours.

I am trying to use Goldbach's Conjecture to print out numbers as sums of primes. Once it prints number n it should move onto n+1 until it reaches the upper limit. 

Now I have this

```
#include <stdio.h>

int prime(int num);

int main() {
    int upper, lower, tempL, x;

    printf("Enter lower limit:");
    scanf("%d", &lower);

    printf("Enter upper limit:");
    scanf("%d", &upper);

    for (lower; lower <= upper; lower + 2) {
        tempL = lower;
        for (tempL; tempL != 0; tempL--) {
            if (prime(tempL == 0) { //after decrementing we find a prime
                x = lower - (tempL); x = the original lower limit minus the current decremented lower limit
                if (prime(x) == 0) { //if x if prime do following
                    printf("%d = %d + %d\n", tempL, lower, x); //print
                    break;
                }
            }
        }
    }
}          

int prime(int number) { //returns 0 if number is prime
    int i;
    for (i = 2; i < number / 2; i++) {
        if (number % i == 0) {
            return 1;
        }
    }
    return 0;
}

```

But I still get the same issue