'自增加法: 输入任意整数 b 且大于等于1, 其运算式如 b+(b-1)+(b-2)+(b-n) b-n=1 自增加法5=5+4+3+2+1=15
'调用方法:自增加法(大于0的整数 integer类型)
'返回结果: integer类型
Public Function 自增加法(ByVal b As Integer) As Integer
Dim x As Integer = b
Dim n As Integer = 0
While x > 0
n = n + x
x = x - 1
End While
Return n
End Function