如何使圆形百分比总计100%在C#中
我想知道价格上涨的百分比上涨,我有3个文本框:
txtcost_price,salesprice和txtmarkup。 “ IS = 54300
“ txtmarkup”的结果= 3.42857142857143
如何使txtmarkup产生的百分比在逗号之后没有多个数字?我使用印尼货币。
double CostPrice; double results, SalesPrice;
CostPrice = Convert.ToInt32(C_1_1_txtCost_Price.Text);
SalesPrice = Convert.ToInt32(C_1_3_SalesPrice.Text);
results = (SalesPrice - CostPrice) / CostPrice * 100;
C_1_2_txtMarkup.Text = Convert.ToString(results);
I want to know the percentage increase in the price being rounded off, I have 3 textboxes in winforms :
txtCost_Price, SalesPrice, and txtMarkup.
value "txtCost_Price" is = 52500
and the value of "SalesPrice" is = 54300
result of "txtMarkup" = 3.42857142857143
how to make percentage result from txtMarkup not have multiple numbers after comma? I use Indonesian currency.
double CostPrice; double results, SalesPrice;
CostPrice = Convert.ToInt32(C_1_1_txtCost_Price.Text);
SalesPrice = Convert.ToInt32(C_1_3_SalesPrice.Text);
results = (SalesPrice - CostPrice) / CostPrice * 100;
C_1_2_txtMarkup.Text = Convert.ToString(results);
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论