Пример #1
0
int main()
{
	int a,b;
	init();
	while(scanf("%d %d",&a,&b) == 2)
		printf("%d\n",countprime(a,b));
	return 0;
}
Пример #2
0
void main()
{
long i,range;
long count=1;
double x;
printf("Enter the range: ");
scanf("%ld\n",&range);
for(i=3;i<range;i++)
{
x=sqrt(i);
count+=countprime(floor(x),i);
}
printf("\n Total number of prime numbers are %ld",count);
}