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

来源:学生作业帮助网 编辑:六六作业网 时间:2024/07/05 17:27:22
编写一个程序,计算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.V

编写一个程序,计算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