Saturday, January 18, 2014

Project Euler Problem 1 Multiples of 3 and 5 Solutions

Day 1: Project 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.

http://projecteuler.net/problem=1

There are many different solutions to any given problem, some more elegant than others. I have seen the solution to this code in as little as 1 line of javascript code. There exist many ways of arriving at the solution, arranging the steps and order of operations, cleanliness of code, readability, simplicity and hundreds of other qualitative variables that affect the code. 

My solution to the code:



Project Euler Problem 1 Solution


Made using: Khan Academy Computer Science.

Creating the above program was my first return to programming since college. From this project I learned:

  • Khan Academy tutorials are exceptional, and the code editing tool is great with the documentation for examples on coding, proper usage, and much more.
  • What seems the most simple and straightforward in the beginning of writing a program will become the biggest challenge of the entire project.
  • A problem may not be solved the way you first anticipate it, and that the way you are trying to solve a problem might be causing new and different problems. Try to simplify and accomplish one step at a time. 

Welcome to the Official Blog of "Learning to Program: Solving Euler's Problems with Javascript"

Hello and Welcome to this learning project,

I created this blog to:
  1. Help myself keep track and organized while learning javascript.
  2. to update and make progress daily while learning javascript.
  3. help others learn javascript and find the solution to all of Project Euler's challenges solved in JavaScript in one place. 

I will be updating this blog daily and posting (hopefully) one completed challenge per day. I am planning on doing this for an entire year and hopefully gain a new career as a software engineer designing apps, building robots, creating digital artwork, and pursuing many of my other hobbies professionally. Again welcome and I hope this blog is a resource to you as a student, teacher or both!

-Joaquin