Skip to content

Instantly share code, notes, and snippets.

@ayato-p
Created October 26, 2012 07:02
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ayato-p/3957334 to your computer and use it in GitHub Desktop.
Save ayato-p/3957334 to your computer and use it in GitHub Desktop.
def prime(n)
k=2
c=0
if n==1
print("false","\n")
else
while k<n-1
b=n%k
if b==0
print("false:",k,"\n")
c=c+1
end
if c==0
print("true","\n")
end
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment