We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
try this:
retrun ceil(2*area/(float)base);
the conversion to float is necessary so that ceil will have some effect.
the above code works for c++;
but will not work for javascript and simillar languages since it does not have float data type.
Cookie support is required to access HackerRank
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 →
try this: retrun ceil(2*area/(float)base); the conversion to float is necessary so that ceil will have some effect. the above code works for c++; but will not work for javascript and simillar languages since it does not have float data type.