Advertisement
Guest User

Untitled

a guest
Nov 12th, 2019
73
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.26 KB | None | 0 0
  1. #include <iostream>;
  2. using namespace std;
  3. int main()
  4. {
  5. int n,i;
  6. cout<<"podaj liczbe:"<<endl;
  7. cin>>n;
  8. for (i=2; i<n; i++)
  9. if(n%i==0)
  10. i=n+1;
  11. if(i==n)
  12. cout<<"Jest to liczba pierwsza";
  13. else
  14. cout<<"Jest to liczba zlozona";
  15. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement