Cody

Solution 1818672

Submitted on 17 May 2019 by Dani Péter
This solution is locked. To view this solution, you need to provide a solution of the same size or smaller.

Test Suite

Test Status Code Input and Output
1   Pass
x = 1; n=1; y_correct = 1; assert((nroot(n,x)-y_correct)<0.001)

2   Pass
x = 1; n=2; y_correct = 1; assert((nroot(n,x)-y_correct)<0.001)

3   Pass
x = 1; n=2; y_correct = 1; assert((nroot(n,x)-y_correct)<0.001)

4   Pass
x = 10; n=2; y_correct = 3.1623; assert((nroot(n,x)-y_correct)<0.001)

5   Pass
x = 10; n=10; y_correct = 1.2589; assert((nroot(n,x)-y_correct)<0.001)

6   Pass
x = 100; n=100; y_correct = 1.0471; assert((nroot(n,x)-y_correct)<0.001)