VB分别利用For和Do循环语句求s=1+1/2+1/4+1/7+1/11+1/16+1/22+……的值,当第i项的值
问题描述:
VB分别利用For和Do循环语句求s=1+1/2+1/4+1/7+1/11+1/16+1/22+……的值,当第i项的值
答
Public Class Form1Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.ClickDim x As Integer = 1, s As Single, i As IntegerDo While...