Why do you pass n in your function (and not x) ?
Agree with above. According to the description you are given the randomized array.
This solution should be wrong, at least according to the description.
1328 Solvers
Project Euler: Problem 1, Multiples of 3 and 5
1496 Solvers
Back to basics 11 - Max Integer
679 Solvers
277 Solvers
251 Solvers
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!