为什么我的图片上传后都会被缩这么下啊 受不了啊 只能这样了 把代码复制过来吧上面说的有点不准确 应该是 "四舍六入五取偶" 看看吧希望对你有帮助。。。。。。
- <font size="3">Console.WriteLine(Math.Round(-4.5));//运行结果-4
- Console.WriteLine(Math.Round(-3.5));//运行结果-4
- Console.WriteLine(Math.Round(-2.5));//运行结果-2
- Console.WriteLine(Math.Round(-1.5));//运行结果-2
- Console.WriteLine(Math.Round(-0.5));//运行结果-0
- Console.WriteLine(Math.Round(0.5));//运行结果-0
- Console.WriteLine(Math.Round(1.5));//运行结果-2
- Console.WriteLine(Math.Round(2.5));//运行结果-2
- Console.WriteLine(Math.Round(3.5));//运行结果-4
- Console.WriteLine(Math.Round(4.5));//运行结果-4
- Console.WriteLine(Math.Round(5.5));//运行结果-6
- Console.WriteLine(Math.Round(6.5));//运行结果-6
- Console.WriteLine(Math.Round(7.5));//运行结果-8
- Console.WriteLine(Math.Round(8.5));//运行结果-8
- Console.WriteLine(Math.Round(9.5));//运行结果-10
- Console.WriteLine(Math.Round(10.5));//运行结果-10
- Console.WriteLine(Math.Round(11.5));//运行结果-12
- Console.WriteLine(Math.Round(12.5));//运行结果-12</font>
复制代码 |