Created
December 15, 2015 12:19
-
-
Save Nata01/dacb2ae1411586799739 to your computer and use it in GitHub Desktop.
Prime numbers
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
bool isPrime(int number){ | |
for(int i = 2; i <= sqrt((double)number); i++){ | |
if(number%i == 0) | |
return false; | |
} | |
return true; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment