This solution is outdated. To rescore this solution, sign in.
Test | Status | Code Input and Output |
---|---|---|
1 | Pass |
a = 3;
b = 4;
c = 5;
y_correct = 2.4;
assert(isequal(triangle_height(a, b, c), y_correct));
num =
3 4 5
check =
3 4 5
y =
2.4000
|
2 | Pass |
a = 1;
b = 2;
c = 3;
y_correct = NaN;
assert(isequaln(triangle_height(a, b, c), y_correct));
num =
1 2 3
check =
1 2 3
y =
NaN
|
3 | Pass |
a = 0;
b = 1;
c = 1;
y_correct = NaN;
assert(isequaln(triangle_height(a, b, c), y_correct));
num =
0 1 1
check =
0 1 1
y =
NaN
|
4 | Pass |
a = -3;
b = -4;
c = -5;
y_correct = NaN;
assert(isequaln(triangle_height(a, b, c), y_correct));
num =
-3 -4 -5
check =
-5 -4 -3
y =
NaN
|
Longest run of consecutive numbers
1651 Solvers
Arrange vector in ascending order
624 Solvers
274 Solvers
The Answer to Life, the Universe, and Everything
383 Solvers
443 Solvers
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!