编写一个程序,计算s=2+3/2+4/3+5/4+…+51/50.

来源:学生作业帮助网 编辑:作业帮 时间:2024/04/29 15:28:32
编写一个程序,计算s=2+3/2+4/3+5/4+…+51/50.

编写一个程序,计算s=2+3/2+4/3+5/4+…+51/50.
编写一个程序,计算s=2+3/2+4/3+5/4+…+51/50.

编写一个程序,计算s=2+3/2+4/3+5/4+…+51/50.
VB程序 Private Sub Command1_Click() Dim a,i As Integer i = 1 While i < 50 s = s + (i + 1) / i i = i + 1 Wend Print "s="; s End Sub