用vb编程已知平面坐标系中两点的坐标,求两点的距离
问题描述:
用vb编程已知平面坐标系中两点的坐标,求两点的距离
答
Const e As Double = 0.000001Sub jisuan(x1 As Long,y1 As Long,x2 As Long,y2 As Long)c1 = Val(Str(x2 - x1))c2 = Val(Str(y2 - y1))Dim x As Doublex = c1 * c1 + c2 * c2Dim d1 As Double,d2 As Doubled1 = x /...