Skip to content

Commit

Permalink
problem 5
Browse files Browse the repository at this point in the history
  • Loading branch information
elgar328 committed Dec 9, 2022
1 parent 709c53f commit ac6e5e9
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions P005.m
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
%% Project Euler - Problem 5
% Smallest multiple
% https://projecteuler.net/problem=5

num = 1;
for n = 1:20
num = num*n/gcd(n,num);
end
disp(num)


0 comments on commit ac6e5e9

Please sign in to comment.