Skip to content

Instantly share code, notes, and snippets.

@completejavascript
Created September 15, 2018 01:15
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save completejavascript/03fe269b113b72a13119611b2ca8e988 to your computer and use it in GitHub Desktop.
bool IsPrimeNumber(int a)
{
if(a < 2) return false;
for(int i = 2; i*i <= a; i++)
if(a % i == 0) return false;
return true;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment