Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- int main ()
- {
- for(int c=2;c<255;c++)
- {
- bool prime=true;
- for(int x=2;x*x<=c;x++)
- {
- if (c%x==0)
- {
- prime=false;
- break;
- }
- }
- if(prime)cout<<c<<endl;
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement