试题

试题 试卷

logo

题型:填空题 题类:常考题 难易度:普通

浙教版初中信息技术九年级上学期期末试卷(13)

程序填空:用VB实程序实现:小明今年15岁,他在今年生日的这一天种了1课树,他有一个愿望:从明年开始他每年比上一年多种1棵树。请问当小明所种的树达到100棵时,他的年龄是多少?

Private Sub Command1_Click()

    Dim age As Integer, tree As Integer

    age = 15

    tree = 1

    Do While tree

        age =

        Tree = tree + (age - 14)

     

    Text1.Text = Str(age)

End Sub

返回首页

试题篮