?
2009-12-22 06:50:05 UTC
Here is the programming code
#include
using namespace std;
int main ( )
{
float i, x;
int step, n, count=0;
int keep=3;
cout<<"Enter the number of prime numbers you want"<
cout<<"2";
for (step=1; step<=n; step++; i++)
for (i>=3)
{
keep = count;
for (x=2; x<=i-1; x++)
{
if (i%x != 0)
count = i;
else if (i%x == 0)
{
count = keep;
break;
}
}
cout<<", "<
}
return 0;
}
The program was suppose to tell the user "Enter the number of prime numbers you want", and when the user enters a number "n" the program is suppose to display the numbers this way
2, 3, 5, 7, 11, ......................., the Nth Prime Number