CodePudding user response:
For reference comparison:# include
Int isprime (int a)
{
int i;
If (a<=3) return a> 1;
for(i=2; I * i<=a; I++)
{
If (a % I==0) return 0;
}
return 1;
}
Int outprime (int z)
{
Int j, CNT=0;
For (j=2; J{
If (isprime (j))
{
Printf (" % 4 d ", j);
Cnt++;
If (CNT % 6==0) printf (" \ n ");
}
}
}
Int main ()
{
Int t;
Printf (" please enter the number which you want to request within the scope of the prime number: ");
The scanf (" % d ", & amp; T);
Outprime (t);
return 0;
}