Problem 2021. Is this triangle right-angled?
Solution Stats
Problem Comments
-
6 Comments
This is a good problem to refresh basic geometry
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.
Basic triangle math plus if statements. Great example
This reminds me the old good days ... basic geometry as Sreeram Mohan said :)
Brain clearance
great problem!
Solution Comments
-
2 Comments
easy and interesting
easy one
-
3 Comments
tricky
Good problem
Hard problem
-
1 Comment
nice
-
1 Comment
if (a^2+b^2-c^2==0)
flag = true;
else
flag = false;
end
-
1 Comment
Easy problem.
-
1 Comment
Can we please block and ban all these fake answers that cheat the webapp into returning success when they haven't actually solved the problem?
-
2 Comments
What is wrong with this code?
use
if c==sqrt(a^2 + b^2)
flag=true
else
flag=false
-
1 Comment
Should add tolerance of 10*eps to make this function practical. Otherwise you can have a triangle with a 89.9999999 deg angle and it will say it is not a right triangle. Matlab is a numerical language.
-
1 Comment
This user (mohamed elbesealy) appears to have gamed the system, with fraudulent "likes" of this unremarkable solution submitted by 'sock-puppet' accounts. —DIV
-
1 Comment
mmm c is always grater than a and b
-
1 Comment
This problem was repeated
Problem Recent Solvers4776
Suggested Problems
-
4843 Solvers
-
578 Solvers
-
Convert a vector into a number
579 Solvers
-
Remove the two elements next to NaN value
609 Solvers
-
687 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!