Skip to content

amasend/l_pierwsze

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 

Repository files navigation

l_pierwsze

#include

using namespace std;

int main() { unsigned int i = 2,p = 2,x,z; bool k;

cin >> x; while(i <= x) { k = true; for(z = 2; z < p; z++) { if(p % z == 0) { k = false; break; } } if(k) cout << p << " ";

p++;
i++;

} cout << endl; return 0; }