求VB编程2-100求和FOR DO WHILE都要FOR DO WHILE都分别要的哦

来源:学生作业帮助网 编辑:作业帮 时间:2024/07/08 20:50:07
求VB编程2-100求和FOR DO WHILE都要FOR DO WHILE都分别要的哦
x){)iWtO')+{xlbY#ӎg<&Hh _`gCUǹ%d):Uih*8+x敤U)KfB&B16e p4VH!$_dLOB&\/$7t]R`̜Tv8!+m/.H̳ՠ

求VB编程2-100求和FOR DO WHILE都要FOR DO WHILE都分别要的哦
求VB编程2-100求和FOR DO WHILE都要
FOR DO WHILE都分别要的哦

求VB编程2-100求和FOR DO WHILE都要FOR DO WHILE都分别要的哦
Function GetSumByFor() As Integer
Dim i As Integer, s As Integer
s = 0

For i = 2 To 100
s = s + i
Next

GetSumByFor = s
End Function
Function GetSumByWhile() As Integer
Dim i As Integer, s As Integer
i = 2
s = 0

Do While i