I have an exam this week and the math concept specifically ROUNDING is being brought up by my classmates and I need some clarification.
I am stating that if both operands are integers then my answer will be in integer form, BUT YOU ROUND DOWN ALWAYS.
What would the answer be for a math problem like the following? we don't need decimals its just integers EXAMPLE: X = 5/2=2.5 but the integer is rounded down to the final answer of 2, NOT 3.
problem being debated is :
7/2=3.5 but written in integer form wouldn't it be 3 and not 4?
I thought the computer would automatically round down? Am I off?
we are not using double data type or decimal.round method. I read that there is something like the banking method where you round to the closest even number and another method where you round to the number furthest away from zero. BUT we did not cover any of that in class.
I am stating that if both operands are integers then my answer will be in integer form, BUT YOU ROUND DOWN ALWAYS.
What would the answer be for a math problem like the following? we don't need decimals its just integers EXAMPLE: X = 5/2=2.5 but the integer is rounded down to the final answer of 2, NOT 3.
problem being debated is :
7/2=3.5 but written in integer form wouldn't it be 3 and not 4?
I thought the computer would automatically round down? Am I off?
we are not using double data type or decimal.round method. I read that there is something like the banking method where you round to the closest even number and another method where you round to the number furthest away from zero. BUT we did not cover any of that in class.

Comment