/* PRIME NUMBER SERIES IN BETWEEN RANGE */
#include<stdio.h>
#include<conio.h>
void main()
{
int i,j,m,n,c=0;
clrscr();
printf("\n Enter the starting point and ending point : ");
scanf("%d%d",&m,&n);
printf("\n The prime number in between %d and
%d",m,n);
for(i=m;i<=n;i++)
{ c=0;
for(j=1;j<=i;j++)
{
if(i%j == 0)
c++
}
printf(" %2d",i);
}
getch();
}
No comments:
Post a Comment