I was trying to find the area of the triangle to code in assembly on raspberry pi 4 but I am only allowed to have the user input 2 inputs which is the length and width of the rectangle. Is it even possible to find the the values of the sides of the triangle (s1, s2, s3) with just 2 inputs? like I know s2 will be the length of the rectangle but how about the other 2 sides? I don't think i can also compare s1 s3>s3 as well.
CodePudding user response:
Going by your drawing with a triangle above the rectangle: No.
Just the dimensions of the rectangle is not enough, because the "triangle point" could be moved around to change the sides.