Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- int main ()
- {
- int a=100;
- int podzielna;
- cout << 2 << endl;
- for (int kolejna=3; kolejna<=a; kolejna++)
- {
- podzielna = 0;
- for (int i = 2; i < kolejna; i++)
- {
- if (!(kolejna%i))
- {
- podzielna = 1;
- break;
- }
- }
- if (!podzielna)
- {
- cout << kolejna << endl;
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement