Technicalsymposium



Join Our Email Alerts-Subscribe
Important Note:Login & Check Your Email Inbox and Activate Confirmation Link


Enter Your Email :

PRIME NUMBER FINDING

void main()

{

int i,n,c=0,j,a,b;

clrscr();

printf("Enter any number:");

scanf("%d%d",&a,&b);

for(i=a;i<=b;i++)

{

c=0;

for(j=1;j<=i;j++)

{

if(i%j==0)

{

c++;

//printf("i=%d and j=%d and c=%d\n",i,j,c);

}

}

if(c==2)

{

printf("%d\n",i);

}

}

getch();

}


All Programming Codes/Onlie Training/ Lab Manuals Download