Problem 2021. Is this triangle right-angled?
Given three positive numbers a, b, c, where c is the largest number, return true if the triangle with sides a, b and c is right-angled. Otherwise, return false.
Solution Stats
Problem Comments
-
6 Comments
Show
3 older comments
Sreeram Mohan
on 24 Nov 2014
This is a good problem to refresh basic geometry
Joseph
on 28 Sep 2015
The checking should include a random Pythagorean triple (given random natural numbers a>b: a^2-b^2, 2ab, and a^2+b^2 form a Pythagorean triple). For the checking right now, a~=2 passes the tests.
Rachel Wedemeyer
on 5 Apr 2018
Basic triangle math plus if statements. Great example
Othmane ELMOUATAMID
on 9 Aug 2018
This reminds me the old good days ... basic geometry as Sreeram Mohan said :)
nguyen thai son son
on 27 Sep 2019
Brain clearance
Nikita Kukhtin
on 24 Jun 2022
great problem!
Solution Comments
Show commentsProblem Recent Solvers5393
Suggested Problems
-
3466 Solvers
-
4159 Solvers
-
536 Solvers
-
Flag largest magnitude swings as they occur
668 Solvers
-
Find the sides of an isosceles triangle when given its area and height from its base to apex
1695 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!