double x = 3.6;
int ans = (int)(x + 0.5);
RELATED READING
延伸阅读
更多一线实战笔记与深度复盘,助您持续精进