你把你计算出来的值,转换一下,我帮你写了个按钮事件,实验是成功的,你试试
int i;
double ans, surplus, a, b;
a=double.Parse(textBox1.Text);
b=double.Parse(textBox2.Text);
ans=a/b;
surplus = ans;
i = 0;
while(surplus>10)
{
surplus = surplus / 10;
i++;
}
string t = "答案是" + surplus.ToString() + "E" + i.ToString();
MessageBox.Show(t);