SHARE
TWEET

titler :)

a guest Feb 27th, 2020 82 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  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. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Top