• 2021-04-14
    单击窗体,在窗体上打印数列:2/1 ,3/2 ,5/3 ,8/5 ,13/8 … 的前10项,并求其和,将和保存在变量s中。
    Private Sub Form_Click()
    Dim i%, j%, k%, m As Integer
    Dim s As Single
    s = 0
    i = 2 'i为分子
    j = 1 'j为分母
    For k = 1 To 10
    s = 【1】
    Print i & "/" & j
    m = j
    j = i
    i = 【2】
    Next
    Print s
    End Sub