1
0
forked from newde/homework
Files
homework/260314/100以内的素数.cpp
2026-03-21 07:26:56 -04:00

21 lines
340 B
C++

#include<iostream>
using namespace std;
int main(){
for(int i=2;i<100;i++){
bool n=true;
for(int j=2;j*j<=i;j++){
if(i%j==0){
n=false;
break;
}
}
if(n)
cout<<i<<" ";
}
return 0;
}