//Prime Nos Till Limit
//Downloaded from www.c4cprog.co.nr
#include<conio.h>
void main()
{
int n,i,p=0,j;
clrscr();
printf("Enter Limit :");
scanf("%d",&n);
printf("\n Prime Nos are : ");
for(i=2;i<=n;i++)
{ p=0;
for(j=2;j<=i/2;j++)
{
if((i%j)==0)
p++;
r}
if(p==0)
printf("%d ",i);
}
getch();
}
Programs Can Also Be Downloaded From The Folders Below....[Or Scroll Down]
Prime Nos. till limit
Click Here To Download C File Of This Program
Subscribe to:
Post Comments (Atom)
0 comments:
Post a Comment