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 the function to get the ascii value of the character?

6 Answers   Netxcell, Oracle,


write a vb script to generate 3*3 matrix

2 Answers  


What is the difference between function and procedure?

0 Answers  


after medical test,when will be the police verification

0 Answers   IBM,


who you define variables and functions in VB?

1 Answers  






In our application qtp unable to indentify the menu items,we tried number of times to add objetcs into object repository but fail. through normal recording mode only objects going to add into repository but while running same recording script qtp showing a error like " unable to indentify the object". in repository there is no any properties and pro values for that object and also i tried with virtual object config also unable to find the object in application and in repository. Then what i have to do to identify menu objects????? can anybody hell me pls..............

2 Answers   Blue Star,


Is VBscript case-sensitive?

3 Answers  


Explain the filter expression?

0 Answers  


Explain about the extension .hta?

0 Answers  


how to validate the text in a web table

2 Answers   Mphasis,


Mention if qtp generates vbscript code as we record actions, can't it possible to directly write using vbscript code when qtp does the same thing too?

0 Answers  


Write a program to print all lines that contains a word either “testing” or “qtp”

2 Answers  


Categories