CodePudding user response:
Have a great god solveCodePudding user response:
After another wall bumps by topCodePudding user response:
by bumps bumpsCodePudding user response:
# include & lt; stdio.h>Int IsPrime (int x)
{
If (x & lt; 2) return 0;
For (int I=2; i
If (x % I==0)
return 0;
}
return 1;
}
Void PrintPrime (int m, int n)
{
int count=0;
Int k=0;
For (int I=m; i <=n; I++)
{
If (IsPrime (I))
{
Printf (" % d ", I);
K++;
count++;
}
If (k==5)
{
printf("\n");
K=0;
}
}
if(! The count) printf (" no prime in the area ");
}
Int main ()
{
Int m, n;
Printf (" input two number: ");
The scanf (" % d % d ", & amp; M, & amp; N);
If (m & lt; N)
{
PrintPrime (m, n);
}
The else
{
PrintPrime (n, m);
}
return 0;
}
CodePudding user response:
C + + environment, only the output of the outputCodePudding user response:
Is not what I mean is that the output use commas in the middle