Problem 44267. Brain Teaser Solver
Write an algorithm to solve this brain teaser:
You have a square that is broken into four triangles, the area of three of those triangles is given. You must determine the area of the center triangle. Your function will take in 3 arguments A, B, and C. Below is an image of this problem, in this example A = 4, B = 3, and C = 2.
![](https://ds055uzetaobb.cloudfront.net/image_optimizer/e98b09fafd291dda73ea74ea5319dfa7e814f535.png)
Solution Stats
Problem Comments
-
1 Comment
Unless I'm screwing something up, I think there are three possible answers to this question, and you're looking for the integer one? Given the answers you are looking for, A and C are always the triangles that have one full side of your square, but that's not specified in the problem statement.
Solution Comments
Show commentsProblem Recent Solvers28
Suggested Problems
-
Who knows the last digit of pi?
654 Solvers
-
279 Solvers
-
Rotate input square matrix 90 degrees CCW without rot90
600 Solvers
-
324 Solvers
-
Calculate the number of elements in a matrix.
117 Solvers
More from this Author2
Problem Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!