Cody

Solution 726675

Submitted on 1 Sep 2015 by goc3
  • Size: 23
  • This is the leading solution.
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
%% x1=0;y1=0;x2=10;y2=6 N = 14; assert(isequal(sqrnbr(x1,y1,x2,y2),N));

y2 = 6 ans = 14

2   Pass
%% x1=0;y1=1;x2=10;y2=21 N = 20; assert(isequal(sqrnbr(x1,y1,x2,y2),N));

y2 = 21 ans = 20

3   Pass
%% x1=0;y1=3.5;x2=10;y2=3.5 N = 10; assert(isequal(sqrnbr(x1,y1,x2,y2),N));

y2 = 3.5000 ans = 10

Suggested Problems

More from this Author13