You need to test with more than one number. Many attempt (and succeed) with a static vector solution until they are lucky.
When i run the program it says fn is undefined. Please explain
2268 Solvers
2261 Solvers
Project Euler: Problem 6, Natural numbers, squares and sums.
1038 Solvers
388 Solvers
712 Solvers
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!