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".
1263 Solvers
Back to basics 25 - Valid variable names
293 Solvers
Is this triangle right-angled?
2876 Solvers
249 Solvers
Matlab Basics - Absolute Value
360 Solvers
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!