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

JudyJudy
Simplicity is my specialty.
Chat with Judy
CoachCoach
Success isn't just about winning—it's about vision, patience, and playing the long game.
Chat with Coach
FranFran
I've made my fair share of mistakes, and if I can help you avoid a few, I'd sure like to try.
Chat with Fran

Add your answer:

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