充值活动已开启,快来参与吧 关闭充值活动
当前位置: 高中信息技术 /
  • 1. 下列VB程序用于求2个正整数(均小于10000)的最大公约数,请在程序划线处填入合适的代码。

    Private Sub Command1_Click()

    Dim x As Integer, y As Integer, z As Integer

    x=Val(Text1.Text): y=Val(Text2.Text)

       ①  

    Text3.Text=Str(z)

    End Sub

    Function gcd(a As Integer, b As Integer)As Integer

    Do While a< >b

     If a>b Then a=a-b Else b=b-a

    Loop

        ② 

    End Function

     ② 

基础巩固 换一批