Euler Problem 1: Multiples of 3 and 5 : C programming solution

Problem Statement :

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.

Solution Approach:

Being the first problem of the series, its quite a simple one. there are many ways to approach this problem.

Most simplest one isĀ  to iterate through all the numbers from 3 to 1000 and check if its divisible by 3 or 5. If they are, just add them to the sum. Read More…

Categories: Programming Tags: Tags: , , ,

Warning: Unknown: write failed: Disk quota exceeded (122) in Unknown on line 0

Warning: Unknown: Failed to write session data (files). Please verify that the current setting of session.save_path is correct (/var/cpanel/php/sessions/ea-php74) in Unknown on line 0