Private Sub Command1_Click()Dim n As IntegerDim yi() As Single, xi() As Single, li() As SingleDim y0 As Single, x0 As Singlen = Val(InputBox(“输入插值点的个数“) + 1x0 = Val(InputBox(“输入要求点的 x 值“)ReDim yi(n)ReDim xi(n)ReDim li(n)For i = 1 To nyi(i) = Val(InputBox(“输入第“ & i & “个插值点的 y 值“)xi(i) = Val(InputBox(“输入第“ & i & “个插值点的 x 值“)Next iFor i = 1 To nli(i) = 1Next iFor i = 1 To nFor j = 1 To nIf i j Then li(i) = li(i) * (x0 - xi(j) / (xi(i) - xi(j)Next jNext iFor i = 1 To ny0 = y0 + li(i) * yi(i)Next iText1.Text = y0End Sub