Don't like ads? PRO users don't see any ads ;-)
Guest

Untitled

By: a guest on May 4th, 2012  |  syntax: C++  |  size: 0.12 KB  |  hits: 13  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  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”;