Prime Numbers

#include <iostream>


int main(){

int i,j;

for (i=2; i<1000; i++){
for(j=2;j <=(i/j); j++)


// if  i mode j is ture, break 
if (!(i%j)) break;


if(j> (i/j))

//  write out prime
std:: cout<<i<<std::endl;
}
}

posted @ 2019-05-11 13:27  Poission  阅读(157)  评论(0编辑  收藏  举报