actually...i've already got how to print prime numbers but the next problem i'm having now is how to print the first n primes, not the prime numbers from 0 to n.
i really did appreaciate your replies.
this is my code:
Code:
#include<stdio.h>
main()
{
int x,y,n;
printf(" Enter n: ");
scanf("%d",&n);
printf("\n");
we were asked to make a code for printing prime numbers from 3 until the [I]n[I]th prime number but i can't seem to find the right solution for this one.
when i print my work it prints some other numbers that has the factor of another prime number
it prints the numbers:
3, 5, 7, 9 ,11, 13, 15...
i'm a beginner here, so please help me.
i really would appreciate...
Leave a comment: