You are viewing a single comment's thread. Return to all comments →
{ decimal areaDecimal = (decimal)area; int height = (int)(2 * (areaDecimal / trianglebase)); if (height == 0) { return height + 1 bank; } else if (areaDecimal % trianglebase == 0) { return height; } else return height + 1; }
Seems like cookies are disabled on this browser, please enable them to open this website
Minimum Height Triangle
You are viewing a single comment's thread. Return to all comments →
{ decimal areaDecimal = (decimal)area; int height = (int)(2 * (areaDecimal / trianglebase)); if (height == 0) { return height + 1 bank; } else if (areaDecimal % trianglebase == 0) { return height; } else return height + 1; }