MATLAB: Adding number within a range

MATLAB

Q – Write a piece of code that will sum all the numbers between 1 and abcd.
a = 8 b = 8 c = 3 d =1
New to MatLab and am struggling with this one, hope you can help!
Thanks

Best Answer

no loop needed.
my_sum = sum(1:a*b*c*d)