Advertisement
Guest User

titler :)

a guest
Feb 27th, 2020
151
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.36 KB | None | 0 0
  1. #include <iostream>
  2.  
  3. using namespace std;
  4. int n,d,ok=1;
  5. int main()
  6. {
  7. cin >> n;
  8. if (n<2)
  9. ok=0;
  10. else
  11. for(d=2;d*d<=n;d++)
  12. if(x%d==0)
  13. {
  14. ok=0;
  15. break;
  16. }
  17. if(ok==1)
  18. cout << "NR PRIM";
  19. else
  20. cout << "NR NU E PRIM";
  21.  
  22. return 0;
  23. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement