Prime Number Searcher | JavaScriptSource

Prime Number Searcher

Bas Rosier Jul 25, 2005
This script will find and display all the prime numbers up to a user-determined number.

"1" is not a prime number, even if it's only divisible by 1 and itself. "0" is not a prime number because every result of a division with 0 is 0. Negative numbers behave in the same way positive numbers do. (If you enter a number that is too high, you might get an out of memory error.)

The prime numbers will be displayed below.

The JavaScript Source: Math Related: Prime Number Searcher

Simply click inside the window below, use your cursor to highlight the script, and copy (type Control-c or Apple-c) the script into a new file in your text editor (such as Note Pad or Simple Text) and save (Control-s or Command-s). The script is yours!!!


Did you use this script?  Do you like this site?  Please link to us!

Leave a Response