This solution is outdated. To rescore this solution, sign in.
-
2 Comments
Carlos Manuel Fernández
on 24 Mar 2016
I tried this one in MATLAB and it worked but here it keeps displaying assertion failed for every number different from 1
Tim
on 24 Mar 2016
Because you are using floating point calculations, the result may not be exact. If you round the result to the nearest integer it should work.
Suggested Problems
-
652 Solvers
-
All your base are belong to us
555 Solvers
-
607 Solvers
-
2027 Solvers
-
1395 Solvers
More from this Author96
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!