角函数出现的问题
代码如下:Private Sub Command1_Click()
Dim a, g, s, z, x, d, l, y, f, m, dd, gc As Single
g = Val(Text1.Text)
y = Val(Text2.Text)
s = Val(Text3.Text)
z = Val(Text4.Text)
x = Val(Text5.Text)
d = Val(Text6.Text)
f = Val(Text7.Text)
m = Val(Text8.Text)
l = s - x
Text9.Text = Val(Format(l, "0.0000"))
d = d / 180
f = f / 60 / 180
m = m / 3600 / 180
a = (d + f + m) * 3.1415926
dd = 100 * l * Sin(a) * Sin(a)
gc = dd * Tan(a) + y - z + g
Text10.Text = Val(Format(a, "0.0000"))
Text11.Text = Val(Format(dd, "0.0000000000"))
Text12.Text = Val(Format(gc, "0.0000"))
End Sub
最后的结果GC的答案与实际不符合
不知道,我错在哪里?
请指教,谢谢!