How to generate 3 digit random number?

Answers were Sorted based on User's Feedback



How to generate 3 digit random number?..

Answer / nazeer ahmed

dim upperlimit
dim lowerlimit
dim randomnumber(4)
upperlimit = 500
lowerlimit = 1
For x = 0 to 4
randomize timer
randomnumber(x)=Int((upperlimit-lowerlimit+1)*Rnd)+lowerlimit
msgbox randomnumber(x)
Next

Is This Answer Correct ?    4 Yes 2 No

How to generate 3 digit random number?..

Answer / prathyusha

Randomize
intmax=1000
intmin=300
rNum=Int((intmax-intmin+1)*Rnd+intmin)
MsgBox rnum

Is This Answer Correct ?    0 Yes 0 No

How to generate 3 digit random number?..

Answer / eswar

For i=1 to 3
x = RandomNumber(1,9)
y=y&x
Next
MsgBox y

Is This Answer Correct ?    0 Yes 1 No

Post New Answer

More VB Script Interview Questions

what is extension of the file if its saved from recovery manger to some drive

1 Answers  


How will you reverse a string in vbscript?

0 Answers  


how to find number of characters(letter a) in the sentence Rain Rain Go away

4 Answers  


What is the difference between do until loop and do while loop?

0 Answers  


Could Anybody Please tell me What is the script for Find 3rd Largest element in the Array without using a SORT function int Find(int arr[], int size); Thanks in Advance..

0 Answers   Amazon,






Is it possible to pass optional argument to function in vb script?

2 Answers  


does anyone have qtp11.0 license key.Please sendit to my mail id-rrvv2011@gmail.com...Thanks

0 Answers  


w r p syed then output was deys and click eysd and click ysde and click sdey and click deys and click eysd............

2 Answers   Cap Gemini, iGate,


What is the technology used by vb script?

0 Answers  


We have 1 web page with names column. I am giving the Service Providers1,2,3.... @ that time dynamically some no of names are displaying in the webpage and The Pop up windows are opening(No.of Pop Up windows=No.of Names). The names may be diffar for each and every Service Provders (Dynamically) How can we handle the Dynamic values?

0 Answers  


How should i Create Email invite with server-side Coding?

0 Answers   Altair,


What are the different types of loops available in the vbscript language?

0 Answers  


Categories