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.
its because in the last case the input is as follows:
10.25
17
5
the result will be:12.505
if you are simply typecasting then your answer will be 12,which is wrong because you have to "roundoff" not "truncate".
so,here the output will be 13.
ps-you will get the input/output used in test cases by clicking on the corresponding test cases.
Day 2: Operators
You are viewing a single comment's thread. Return to all comments →
its because in the last case the input is as follows: 10.25 17 5 the result will be:12.505 if you are simply typecasting then your answer will be 12,which is wrong because you have to "roundoff" not "truncate". so,here the output will be 13. ps-you will get the input/output used in test cases by clicking on the corresponding test cases.
https://hr-testcases-us-east-1.s3.amazonaws.com/17155/input03.txt?AWSAccessKeyId=AKIAJAMR4KJHHUS76CYQ&Expires=1463489435&Signature=QcTkdd%2F2bEonvBb4pZoLNeMtB9I%3D&response-content-type=text%2Fplain