03-06-2017, 01:59 PM
2) Write a recursive function to get the pictorial of a number?
(Assuming you meant FACTORIAL)
Dim n 'Number whose factorial you are finding
Dim i ' Loopcounter
Dim Fact 'For Storing Factorial Output
n = 5
Fact = 1
For i = n To 1 Step -1
Fact = Fact * i
Next
MsgBox Fact
(Assuming you meant FACTORIAL)
Dim n 'Number whose factorial you are finding
Dim i ' Loopcounter
Dim Fact 'For Storing Factorial Output
n = 5
Fact = 1
For i = n To 1 Step -1
Fact = Fact * i
Next
MsgBox Fact