你把你计算出来的值,转换一下,我帮你写了个按钮事件,实验是成功的,你试试
inti;
doubleans,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++;
}
stringt="答案是"+surplus.ToString()+"E"+i.ToString();
MessageBox.Show(t);