(int)(x + 0.5) , and for rounding the negative values, we can use the expression (int)(x - 0.5) , where x is the given floating-point number. 1. 2. 3. 4. 5. 6.
確定! 回上一頁