double down = Math.Floor(77.5); //向下取整 double up = Math.Ceiling(77.5); //向上取整 MessageBox.Show("77.5向下取整是" + down+ "\n77.5向上取整是" + up);