发布网友 发布时间:2024-10-23 17:16
共1个回答
热心网友 时间:2024-11-06 07:04
Module Module1
Private Sub fac(ByVal x As ULong, ByRef y As ULong)
Dim i&, a&
a = 1
For i = 1 To x
a = a * i
Next i
y = a
End Sub
Sub Main()
Dim m&, n&, Cmn&, c1&, c2&, c3&
Console.WriteLine("m=")
m = Val(Console.ReadLine())
Console.WriteLine("n=")
n = Val(Console.ReadLine())
Call fac(m, c1) : Call fac(n, c2) : Call fac(m - n, c3)
Cmn = c1 / (c2 * c3)
Console.Write("Cmn={0}", Cmn)
End Sub
End Module