Math.Ceiling 只要有小数都加1

Posted 158-186

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了Math.Ceiling 只要有小数都加1相关的知识,希望对你有一定的参考价值。

            double result1 = Math.Ceiling(0.3);
            Console.WriteLine(result1);//result1显示1

            double result2 = Math.Ceiling(0.5);
            Console.WriteLine(result2);//result2显示1

            double result3 = Math.Ceiling(0.6);
            Console.WriteLine(result3);//result3显示1         

            Console.Read();        

 

以上是关于Math.Ceiling 只要有小数都加1的主要内容,如果未能解决你的问题,请参考以下文章