/ Published in: MatLab
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
% Alexander DeTrano % Project Euler - Problem 6 % Find the difference between % the sum of the squares of the first one % hundred natural numbers and the square of the sum. first100 = [1:100]; %Generate first 100 numbers diff = squares_sum-sum_squares