answersLogoWhite

0

class primenoSeries

{

void main ()

{

int i = 1; // Used to divide number and check if they are factors or not.

int C = 0; // used as a counter for number of factors.

int n = 1; // Represent the numbers.

while (n > 0)

{

if ( n % i n )

{

C = 0;

n++ ;

i = 1;

}// Check next number since previous number had more than two factors.

else

{

i++ ;

}

}

else

i++ ;

}

}

}

User Avatar

Wiki User

14y ago

Still curious? Ask our experts.

Chat with our AI personalities

JordanJordan
Looking for a career mentor? I've seen my fair share of shake-ups.
Chat with Jordan
TaigaTaiga
Every great hero faces trials, and you—yes, YOU—are no exception!
Chat with Taiga
ReneRene
Change my mind. I dare you.
Chat with Rene

Add your answer:

Earn +20 pts
Q: C program to print prime numbers?
Write your answer...
Submit
Still have questions?
magnify glass
imp