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.
int t=tax+tip+meal cost+0.5,t=total amount
just add 0.5 it's fix ur error
the logic is if ur ans is 12.4 it's means it is below the 12.5 so the ans is 12 if ans is 12.6 the the ans is 12 also because the in is just cut the folt num so we add 0.5 the the value is cross 13 nd the ans is shown 13 .
Day 2: Operators
You are viewing a single comment's thread. Return to all comments →
int t=tax+tip+meal cost+0.5,t=total amount just add 0.5 it's fix ur error the logic is if ur ans is 12.4 it's means it is below the 12.5 so the ans is 12 if ans is 12.6 the the ans is 12 also because the in is just cut the folt num so we add 0.5 the the value is cross 13 nd the ans is shown 13 .