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.
that won't entirely work in some cases. I think what you want to do is add + 0.0005 after the computation which will make it the correct number but using printf is the best way to go here.
Cookie support is required to access HackerRank
Seems like cookies are disabled on this browser, please enable them to open this website
Arithmetic Operations
You are viewing a single comment's thread. Return to all comments →
that won't entirely work in some cases. I think what you want to do is add + 0.0005 after the computation which will make it the correct number but using printf is the best way to go here.