IsPrime function

Let's talk about algorithms!

Moderator: Board moderators

Post Reply
27584NX
New poster
Posts: 6
Joined: Thu Jan 16, 2003 6:36 am
Location: Brazil
Contact:

IsPrime function

Post by 27584NX »

How do I develop a simple function to check if some integer is prime or not? Of course I would appreciate you would not submit the trivial one, that I consider building a primes array until I reach the desired number and checking for mod not zero for the number if it
Larry
Guru
Posts: 647
Joined: Wed Jun 26, 2002 10:12 pm
Location: Hong Kong and New York City
Contact:

Post by Larry »

http://acm.uva.es/board/viewtopic.php?t=1662

Try looking at the above thread... =)
Post Reply

Return to “Algorithms”