Skip to content

Instantly share code, notes, and snippets.

@mohitt
Last active February 3, 2018 14:41
Show Gist options
  • Save mohitt/3828ff5028230013c33242bbbeddb5f0 to your computer and use it in GitHub Desktop.
Save mohitt/3828ff5028230013c33242bbbeddb5f0 to your computer and use it in GitHub Desktop.
input n
i=1
while ( i is not equal to n-1)
k = n/i
if ( k equal to 0)
output "number is not a prime"
i = i +1
output "number is a prime "
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment