在窗体上添加1个名称为Command1的命令按钮,编写以下程序,其功能是,单击命令按钮,在窗体上输出n!(用递归实现的)。请填空。n!的递归定义如下: 1 n=1 n!= n*(n-1)! n>1 Private Function f1(ByVal n As Long) As Long If n = 1 Then ______(1)______ Else f1 =______(2)______ End If End Function Private Sub Command1_Click() Dim n As Long, result As Long n =Val(InputBox("请输入n:")) result = f1(______(3)______) Print n; "!= "; result End Sub 完善程序,在答题时,务必在答题框中写好题号和答案,如下: (1): _________ (2): _________ (3): _________

时间:2023-12-14 13:39:17

相似题目