This solution is locked. To view this solution, you need to provide a solution of the same size or smaller.
Test | Status | Code Input and Output |
---|---|---|
1 | Pass |
a = 5;b = 4;c = 3;
y_correct = 6;
assert(abs(AreaOfTriangle(a,b,c) - y_correct) < 1e-3)
|
2 | Pass |
a = 10;b = 4;c = 3;
y_correct = 'Not a triangle!';
assert(isequal(AreaOfTriangle(a,b,c),y_correct))
|
3 | Pass |
a = -5;b = 4;c = 3;
y_correct = 'Not a triangle!';
assert(isequal(AreaOfTriangle(a,b,c),y_correct))
|
4 | Pass |
a = 0;b = 4;c = 3;
y_correct = 'Not a triangle!';
assert(isequal(AreaOfTriangle(a,b,c),y_correct))
|
5 | Pass |
a = 4;b = 4;c = 3;
y_correct = 5.5621;
assert(abs(AreaOfTriangle(a,b,c) - y_correct) < 1e-3)
|
Project Euler: Problem 6, Natural numbers, squares and sums.
1018 Solvers
130 Solvers
198 Solvers
247 Solvers
305 Solvers
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!