Skip to content

Instantly share code, notes, and snippets.

@mellorjc
mellorjc / problem12.html
Created January 3, 2017 17:52
Project Euler problem 12
<!DOCTYPE HTML>
<html>
<body>
<p>Problem 12</p>
<script>
function is_prime(n) {
/*
* Try to divide n by all the numbers from 2 to the square root
* of n. If any divide exactly then we know that n is not prime
* and return false, otherwise if after testing all the mentioned