我有小问题,我需要帮助..
所以这是我的问题,我在 c# 中创建了 win 表单并使用 numericupdown 元素插入我的数字,但我无法计算百分比。下面是代码:
private void button8_Click(object sender, EventArgs e)
{
int x, y, sum;
x = Convert.ToInt16(numericUpDown7.Value);
y = Convert.ToInt16(numericUpDown8.Value);
sum = x * 3.4528 + 21%;
textBox5.Text = Convert.ToString(sum);
}
我需要做的是插入 x 并按下按钮来计算这个公式
例如:x * 3.4528 + 21 % = ???
也许有人可以帮助我。
谢谢大家,谁会帮助我!