Cody

Problem 46063. Area of a pentagon

Solution 2969584

Submitted on 20 Sep 2020
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   Fail
s = 8; A = 9; area_correct = 180; assert(isequal(pentagon_Area(s,A),area_correct))

Unrecognized function or variable 'a'. Error in pentagon_Area (line 2) 2.5*a*A; Error in Test1 (line 4) assert(isequal(pentagon_Area(s,A),area_correct))

2   Fail
s=pi; A=9; area_correct=(45/2)*pi; assert(isequal(pentagon_Area(s,A),area_correct))

Unrecognized function or variable 'a'. Error in pentagon_Area (line 2) 2.5*a*A; Error in Test2 (line 4) assert(isequal(pentagon_Area(s,A),area_correct))

Suggested Problems

More from this Author1

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!