You are viewing a single comment's thread. Return to all comments →
Instead of having overload of calculating bool part, you can subtract 1 from numerator and add 1 to result like this:
cout << (2 * a - 1) / b + 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 →
Instead of having overload of calculating bool part, you can subtract 1 from numerator and add 1 to result like this: