Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- int main()
- {
- int n,k=0;
- cout<<"podaj liczbe"<<endl;
- cin>>n;
- for(int i=n-1; i>2; i--)
- {
- if (n%i==0)
- k++;
- }
- if (k>0)
- cout<<"liczba zlozona"<<endl;
- else
- cout<<"liczna pierwsza"<<endl;
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement