Multiples
Solved
A premium engineering environment for project-based technical challenges. Solve, test, and optimize in a professional-grade workspace.
C++
Run
Problem 001
Find the sum of all natural numbers below 1000 that are multiples of 3 or 5.
#include <iostream> using namespace std; int main() { int sum = 0; for (int n = 3; n < 1000; n += 1) { if (n % 3 == 0 || n % 5 == 0) sum += n; } cout << sum; } output:
233168
Problem queue
Solved
Solved
Solved
Running
Unsolved
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.