#include <stdio.h> #include<math.h> int main(void) { int count,i,m,n; count=0; for(m=2;m<=100;m++){ n=sqrt(m); for(i=2;i<=n;i++) if(m%i==0) break; if(i>n){ printf("%6d",m); count++; if(count%10==0) printf("\n"); } } printf("\n"); return 0; }
haha1235 |
|
||
Copyright © 2024 haha1235
Powered by .NET 9.0 on Kubernetes |