Find the height of a right | C ++ implementation of the approach ; Function to return the height of the right - angled triangle whose area is X times its base ; Driver code
#include <bits/stdc++.h> NEW_LINE using namespace std ; int getHeight ( int X ) { return ( 2 * X ) ; } int main ( ) { int X = 35 ; cout << getHeight ( X ) ; return 0 ; }