diff --git a/src/12/c14/c14_prime.cpp b/src/12/c14/c14_prime.cpp new file mode 100644 index 0000000..f77ee0b --- /dev/null +++ b/src/12/c14/c14_prime.cpp @@ -0,0 +1,49 @@ +#include +#include +#include +#include +#include + +using namespace std; + +template +ostream&operator<<(ostream &os,vector const& v){ + os<<"{ "; + if(v.size()==0){ + os<<" }"; + }else{ + for(size_t i=0;i getPrimes(int const& end){ + vector isFactor(end+1,false); + for(int i=2;i primes; + for(int i=2;i