• 2021-04-14
    Function fun(ByVal num As Long) As Long Dim k As Long k = 1 num = Abs(num) Do While num k = k * (num Mod 10) num = num \ 10 Loop fun = k End Function Private Sub command1_click() Dim n As Long, r As Long n = Val(InputBox("请输入一个数:")) r = fun(n) Print r End Sub 程序运行后,单击命令按钮,输入1234,输出结果为:( )
  • 举一反三