Project Euler, which is named after the mathematician Leonard Euler, is a collection of maths problems that are to be solved using computer programming.

This posts begins a series entitled “* Solving Project Euler*” which is my take on how to solve the questions.

While some problems can be solved by brute force methods, others require clever algorithms.

We begin with Problem 1.

The problem is fairly straight forward.

Find the sum of numbers that are less than 1000, which are multiples of 3 **OR** 5.

## General Algorithm

- Initialize a variable to store the sum.
- Iterate through all the numbers from 1 to 999.
- If the remainder after dividing the numbers by either 3 or 5 is zero add it to the sum.

Advertisements

## Anonymous

/ January 14, 2012I suppose you shouldn’t post the solutions. Its purely unethical.