The problem says the input is a positive integer but the first test inputs 0. In my code that caused r = 0/0 error. Please change the wording to "input is non-negative".
Vectorize the digits of an Integer
269 Solvers
Output any real number that is neither positive nor negative
316 Solvers
345 Solvers
509 Solvers
2722 Solvers
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!