急求高手帮我解决一道VB编程题 关于速度时间曲线的 已知一点的速度 求速度时间曲线

2025-01-01 03:23:16
推荐回答(3个)
回答1:

Private Function jiecheng(x As Integer) As Long '定义阶乘函数
jiecheng = 1
For i = 1 To x
jiecheng = jiecheng * i
Next i
End Function
Private Sub Command1_Click() 'sub求阶乘
a = InputBox("输入A"): b = InputBox("输入B"): c = InputBox("输入C")
sa = 1: sb = 1: sc = 1
For i = 1 To Val(a)
sa = sa * i
Next i
Print sa
For i = 1 To Val(b)
sb = sb * i
Next i
For i = 1 To Val(c)
sc = sc * i
Next i
s = sa + sb + sc
Print s
End Sub

Private Sub Command2_Click() '函数求阶乘
a = InputBox("输入A"): b = InputBox("输入B"): c = InputBox("输入C")
sa = jiecheng(Val(a)): sb = jiecheng(Val(b)): sc = jiecheng(Val(c))
s = sa + sb + sc
Print s
End Sub
很简单滴````自己看吧,加油学吧````
另外,团IDC网上有许多产品团购,便宜有口碑

回答2:

知道速度和时间的关系式么?
如果有关系式就简单了。

回答3:

用vb画曲线很费劲的,而且效果不是好,推荐你用画图控件Tchart