Cody

Solution 1124801

Submitted on 16 Feb 2017 by Peng Liu
  • Size: 35
  • 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
side = 10; nth = 0; Area_correct = 43; Perimeter_correct = 30; [myArea,myPerimeter] = KochSnowFlake(side,nth) assert(isequal(myArea, Area_correct)) assert(isequal(myPerimeter, Perimeter_correct))

myArea = 43 myPerimeter = 30

2   Pass
side = 10; nth = 1; Area_correct = 58; Perimeter_correct = 40; [myArea,myPerimeter] = KochSnowFlake(side,nth) assert(isequal(myArea, Area_correct)) assert(isequal(myPerimeter, Perimeter_correct))

myArea = 58 myPerimeter = 40

3   Pass
side = 10; nth = 20; Area_correct = 69; Perimeter_correct = 9460; [myArea,myPerimeter] = KochSnowFlake(side,nth) assert(isequal(myArea, Area_correct)) assert(isequal(myPerimeter, Perimeter_correct))

myArea = 69 myPerimeter = 9460