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.
This will round the decimals as well. We want to use CEILING in MS SQL so that it removes the decimals.
Take 35.67
Using FLOOR becomes 35
Using CEILING becomes 36
ROUND becomes 35.70 and you have to specify the decimal places to round to. EG - ROUND(35.67, 1). If you specify more than one decimal places to round to, it will keep adding Zeros.
Cookie support is required to access HackerRank
Seems like cookies are disabled on this browser, please enable them to open this website
The Blunder
You are viewing a single comment's thread. Return to all comments →
This will round the decimals as well. We want to use CEILING in MS SQL so that it removes the decimals.
Take 35.67 Using FLOOR becomes 35 Using CEILING becomes 36 ROUND becomes 35.70 and you have to specify the decimal places to round to. EG - ROUND(35.67, 1). If you specify more than one decimal places to round to, it will keep adding Zeros.