Given that the area of a right-angled triangle is X times its base b. The task is to find the height of the given triangle.
Input: X = 40
Input: X = 100
Approach: We know that the area of a right-angled triangle, Area = (base * height) / 2 and it is given that this area is X times the base i.e. base * X = (base * height) / 2.
Solving for height, we get height = (2 * base * X) / base = 2 * X.
Below is the implementation of the above approach:
Attention reader! Don’t stop learning now. Get hold of all the important DSA concepts with the DSA Self Paced Course at a student-friendly price and become industry ready.
- Given a number N in decimal base, find number of its digits in any base (base b)
- Minimum height of a triangle with given base and area
- Count of Right-Angled Triangle formed from given N points whose base or perpendicular are parallel to X or Y axis
- Sum of all numbers formed having 4 atmost X times, 5 atmost Y times and 6 atmost Z times
- C++ program to find all numbers less than n, which are palindromic in base 10 and base 2.
- Find the Nth digit from right in base B of the given number in Decimal base
- Given a number N in decimal base, find the sum of digits in any base B
- Find the coordinates of a triangle whose Area = (S / 2)
- Add two integers of different base and represent sum in smaller base of the two
- Maximum height when coins are arranged in a triangle
- Find all sides of a right angled triangle from given hypotenuse and area | Set 1
- Program to find area of a triangle
- Find area of triangle if two vectors of two adjacent sides are given
- Find the altitude and area of an isosceles triangle
- Find area of the larger circle when radius of the smaller circle and difference in the area is given
- Check if the number is even or odd whose digits and base (radix) is given
- Print the nodes of the Binary Tree whose height is a Prime number
- Times required by Simple interest for the Principal to become Y times itself
- Biggest Reuleaux Triangle within a Square which is inscribed within a Right angle Triangle
- Biggest Reuleaux Triangle inscribed within a Square inscribed in an equilateral triangle
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to firstname.lastname@example.org. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.