I wrote this program to find prime numbers between 1 and 50000, and I still need to find how many prime numbers there is (I tried a lot of tricks but I did not succeed)

```
#include <stdio.h>

//int getValueFromUser();
void PrintListOfPrime(int value);

int main() {
    int value = 23;
    PrintListOfPrime(value);
    return 0;
}

void PrintListOfPrime(int value) {
    int  ValueIsPrime; //ValueIsPrime is used as flag variable

    printf("The list of primes: ");

    for (int i = 2; i <= value; i++) {
        ValueIsPrime = 1;
        /* Check if the current number i is prime or not */
        for (int j = 2; j <= i / 2; j++) {
            /*
             * If the number is divisible by any number
             * other than 1 and self then it is not prime
             */

            if (i % j == 0) {
                ValueIsPrime = 0;
                break;
            }
        }

        /* If the number is prime then print */
        if (ValueIsPrime == 1)
            printf("%d, ", i);
    }
    printf("\n");
}

```