Master complex
algorithms with precision.

A premium engineering environment for project-based technical challenges. Solve, test, and optimize in a professional-grade workspace.

C++

Run

Problem 001

Multiples of 3 or 5

Find the sum of all natural numbers below 1000 that are multiples of 3 or 5.

  1. #include <iostream>
  2. using namespace std;
  3. int main() {
  4. int sum = 0;
  5. for (int n = 3; n < 1000; n += 1) {
  6. if (n % 3 == 0 || n % 5 == 0) sum += n;
  7. }
  8. cout << sum;
  9. }

output:

233168

Problem queue

Pick a maths problem, write the code, run it, check the answer.

001

Multiples

Solved

002

Fibonacci

Solved

003

Prime Factor

Solved

004

Palindrome

Running

005

Small Multiple

Unsolved

006

Sum Square

Unsolved

Powered by Project Euler

The problems featured in this project come from Project Euler. This little project was created as a way to learn, explore, and have fun, with deep appreciation for the thoughtful and inspiring challenges shared by Project Euler with so many curious minds.

License Project Euler