ProjectEuler

For the love of Coding

View project on GitHub

About Project Euler

Leonhard Euler (1707-1783) What is Project Euler? Project Euler is a series of challenging mathematical/computer programming problems that will require more than just mathematical insights to solve. Although mathematics will help you arrive at elegant and efficient methods, the use of a computer and programming skills will be required to solve most problems.

The motivation for starting Project Euler, and its continuation, is to provide a platform for the inquiring mind to delve into unfamiliar areas and learn new concepts in a fun and recreational context.

Learn more

Why I’m doing this

I decided to improve my codings skills and learn to perform tasks without dependencies/frameworks

Problems Solved So far

  1. Problem 1 - Multiples of 3 and 5: If we list all the natural numbers below 10 that are multiples of 3 or 5, we get 3, 5, 6 and 9. The sum of these multiples is 23. Find the sum of all the multiples of 3 or 5 below 1000.

HTML Code

<!-- HTML -->
<div id="answer"></div>

The JavaScript Code

// JavaScript
var answer = document.getElementById('answer'); 
	
var sum = 0; 
	
for(var i=0; i<1000; i++){ 
		
if(((i%3)==0) || ((i%5)==0)){ 
			
    sum += i; 
		
  } 
	
} 
	
answer.innerHTML = sum;