工作在C#的百分比 [英] Working percentage in c#
本文介绍了工作在C#的百分比的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我有两个值中的一个与一个十进制值
和具有值的另一值,将计算出的十进制值
表示实施例的百分比:
10 = 6
60%块引用>
十进制值1 = 10;
百分比数= 60;
textbox1.text =(mathsum这里)的toString()。
您将如何使用十进制值和值包含百分比值计算此值?
解决方案数*百分比/ 100
所以
10 * 60/100 = 6
I have two values one with a decimal value and another value with a value which will calculate the percentage of that decimal value for example:
60 % of 10 = 6
decimal value1 = 10; decimal percentage = 60; textbox1.text = ("mathsum here").toString();
How would you calculate this value using the decimal value and value containing the percentage value?
解决方案number * percentage / 100
so
10 * 60 / 100 = 6
这篇关于工作在C#的百分比的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文