Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- int n,d,ok=1;
- int main()
- {
- cin >> n;
- if (n<2)
- ok=0;
- else
- for(d=2;d*d<=n;d++)
- if(x%d==0)
- {
- ok=0;
- break;
- }
- if(ok==1)
- cout << "NR PRIM";
- else
- cout << "NR NU E PRIM";
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement