Problem 1974. Length of a short side
Solution Stats
Problem Comments
-
7 Comments
Tanya, you like triangles.
Good one
Nice one
Wonder what that smallest solution was.
nice
Interesting
Good question
Solution Comments
-
1 Comment
good problem
-
1 Comment
easy but good
-
2 Comments
easy
Good question
-
1 Comment
easy!
-
1 Comment
Pythagoras theorem
-
1 Comment
These are interesting
-
1 Comment
a = sqrt(c^2-b^2);
-
1 Comment
good question
-
3 Comments
this isn't a calculation!
lol
what the
-
1 Comment
ez
-
1 Comment
test_1 a=sqrt(3) is longer than b=1
the good solution would be
a= min(sqrt(c^2 -b^2),b)
instead
-
1 Comment
Kudos for finding this solution - it did indeed meet all the test cases, but wasn't quite what I had in mind! I will add a new test.
Problem Recent Solvers5443
Suggested Problems
-
Omit columns averages from a matrix
562 Solvers
-
Project Euler: Problem 1, Multiples of 3 and 5
2512 Solvers
-
523 Solvers
-
Sum the numbers on the main diagonal
536 Solvers
-
Is this triangle right-angled?
4763 Solvers
More from this Author10
Problem Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!