answersLogoWhite

0

#include<stdio.h>

main()

{

int check, i, x,y,m;

printf("enter the number upto which check");

scanf("%d",&check);

y=1;

for(m=2; m<=check; m++)

{

for(x=2;x<m; x++)

{ y=m%x;

if(y==0)

break;

}

if(y!=0)

printf("%d is Prime number\n",m);

else printf("%d is not a prime number\n",m);

}

getch();

}

User Avatar

Wiki User

12y 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
MaxineMaxine
I respect you enough to keep it real.
Chat with Maxine
RossRoss
Every question is just a happy little opportunity.
Chat with Ross

Add your answer:

Earn +20 pts
Q: Write a program to find of all prime number between 100and 500?
Write your answer...
Submit
Still have questions?
magnify glass
imp