Hi,
I need to create a code in VBA to successively divide a positive integer N (N=88) by another positive integer D (D=13). I need to determine how many divisions it would take to reduce the resulting number to >= .000001 using a conditional loop.
so far i have:
I know i am getting stuck on the algorithm because i do not know how to continuously divide by D until Z=.000001.
Please help i have been stuck on this problem for HOURS!!
I need to create a code in VBA to successively divide a positive integer N (N=88) by another positive integer D (D=13). I need to determine how many divisions it would take to reduce the resulting number to >= .000001 using a conditional loop.
so far i have:
Code:
Sub Ediv()
Dim N As Integer
Dim D As Integer
Dim Z As Integer
Dim intCount as Integer
N=88
D=13
intCount=0
Do While Z>=.000001
Z=N/D
intCount=intCount+1
loop
End Sub
Please help i have been stuck on this problem for HOURS!!
Comment