mikerickson
10-22-2007, 06:45 PM
Considering the following code, am I correct that
1) Line A is not needed, but both B and C are.
2) This is equivilant to randomTotal = Int(50000 * Rnd())
Dim didget(0 To 4) As Integer, i As Integer, randomTotal As Long
Randomize: Rem line A
For i = 0 To 3
Randomize: Rem line B
didget(i) = Int(10 * Rnd())
Next i
Randomize: Rem line C
didget(4) = Int(5 * Rnd())
For i = 0 To 4
randomTotal = randomTotal + didget(i) * (10 ^ i)
Next iThanks in advance.
1) Line A is not needed, but both B and C are.
2) This is equivilant to randomTotal = Int(50000 * Rnd())
Dim didget(0 To 4) As Integer, i As Integer, randomTotal As Long
Randomize: Rem line A
For i = 0 To 3
Randomize: Rem line B
didget(i) = Int(10 * Rnd())
Next i
Randomize: Rem line C
didget(4) = Int(5 * Rnd())
For i = 0 To 4
randomTotal = randomTotal + didget(i) * (10 ^ i)
Next iThanks in advance.