Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include<iostream>
- #include<cstdlib>
- #include<cstdio>
- using namespace std;
- void czypierwsza(int liczba)
- {
- int j=0;
- for(int i=2; i<liczba; i++)
- {
- if(liczba%i==0)
- {
- cout<<liczba<<"jest podzielna przez "<<i<<endl;
- j++;
- }
- }
- if(j==0)
- cout<<liczba<<" jest lcizba pierwsza elo"<<endl;
- }
- main()
- {
- int tab[3]={3, 8, 11}, rozmiar=3;
- for(int i=0;i<rozmiar; i++)
- {
- czypierwsza(tab[i]);
- }
- system("pause");
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement