#include<iostream>
using namespace std;
int main(){
int n;int c=0;
while (cin>>n){
cout<<1<<endl;
cout<<2<<endl;
for (int j=2;j<=n;j++){
for(int i=2;i<j ;i++){
c=j%i;
if(c!=0){
cout<<j<<endl;
break;
}
else break;
}
}
}
}
3-2编程求解质数
最新推荐文章于 2021-09-05 12:58:18 发布