Guest User

Untitled

a guest
May 4th, 2012
31
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.12 KB | None | 0 0
  1. Int n;
  2. Cin>>n;
  3. For (int i=2; i<=n;i++)
  4. {
  5. If(n%i==0)
  6. Break;
  7. }
  8. If (i==n)
  9. Cout<<”prime”;
  10. Else
  11. Cout<<”not prime”;
Advertisement
Add Comment
Please, Sign In to add comment