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".
2065 Solvers
Find the sum of the elements in the "second" diagonal
1006 Solvers
Determine Whether an array is empty
652 Solvers
Right Triangle Side Lengths (Inspired by Project Euler Problem 39)
566 Solvers
2435 Solvers
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!