1个回答
展开全部
建Command1,代码如下。其中0.00001表示小矩形宽度。
===================
Option Explicit
Private Sub Command1_Click()
Dim x As Double, y As Double, s As Double
For x = -4 To 4 Step 0.00001
y = 1 / (1 + x * x)
s = s + y * 0.00001
Next
Print "定积分为:"; s
End Sub
===================
Option Explicit
Private Sub Command1_Click()
Dim x As Double, y As Double, s As Double
For x = -4 To 4 Step 0.00001
y = 1 / (1 + x * x)
s = s + y * 0.00001
Next
Print "定积分为:"; s
End Sub
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询