Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <math.h>
- using namespace std;
- int main()
- {
- int n, suma = 0, i;
- cin >> n;
- bool ok;
- ok = true;
- for (i = 2; i*i<=n; ++i)
- {
- if (n%i==0)
- ok= false;
- }
- if (ok == true)
- cout << "ESTE PRIM";
- else cout << "NU ESTE PRIM";
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement