##Project Euler #5: Smallest multiple
Project Euler #5: Smallest multiple
2520 is the smallest number that can be divided by each of the numbers from 1 to 10 without any remainder.
What is the smallest positive number that is evenly divisible by all of the numbers from 1 to 20?"
And I'm wondering if my code to solve this problem is good and if there are ways to make it better.
#include "stdafx.h"
#include <iostream>
int main(){
int smallestMultiple = 40;
int i = 10;
while (i<20){
if (smallestMultiple%i == 0){
i++;
continue;
}
else{
i = 10;
smallestMultiple += 20;
}
}
std::cout << smallestMultiple;
}