123 Eng

Engineering the engineers™


Latest Jobs   Forum Map

 


Home
Source Codes
Engineering Colleges

Training  Reports
Seminar Reports
Placement Papers

Forums

   Computer Science / IT
   Electronics
   Electrical
   Mechanical
   Chemical
   Civil

   CAT / MBA

   GMAT / Foreign MBA
Latest Jobs

Engineering Jobs / Technical Jobs
Management Jobs

Sitemap
Terms of use

Displaying  Source Code(s)  
 

 
Random Array

--------------------------------------------------------------------------------

Description : Creates random array

Function RandomArray(alen, LBound, UBound)
Dim i, j, exists, nextrand, newrandom, result

result = Null

If (alen >= 1) Then
ReDim result(alen - 1)
Randomize
For i = 0 To alen - 1
nextrand = True
Do While nextrand
exists = False
newrandom = Int((UBound - LBound + 1) * Rnd + LBound)
For j = 0 To i - 1
exists = exists Or (result(j) = newrandom)
Next
If (Not exists) Then
nextrand = False
result(i) = newrandom
End If
Loop
Next
End If
RandomArray = result
End Function

 

 

Contribute content or training reports / feedback / Comments
job placement papers
All rights reserved © copyright 123ENG