Technicalsymposium



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


Enter Your Email :

C Program For PRIME SERIES.

void main()

{

int r,a,b,c=0;

clrscr();

printf("Enter the n value:");

scanf("%d",&r);

a=1;

while(a<=r)//for(i=1;i<=n;i++)

{

b=1;c=0;

while(b<=a)

{

if(a%b==0)

c=c+1;

b++;

}//end of while

if(c==2)

printf("%d",a);

a++;

}

getch();

}


All Programming Codes/Onlie Training/ Lab Manuals Download