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

How to scroll down a page while recording in qtp. suggest me any method apart from low level recording.

0 Answers  


Explain some uses of vb script?

0 Answers  


can anyone tell me the procedure of interview held in applabs

0 Answers  


Hi Friends, I am facing some issues with If,else condition,i.e. i am working on some web page for ex:gmail page.now if i want to check if username is incorrect or already exist,i want to display error message in my test report,for this i am using a simple code first,i.e. If Browser("Gmail: Email from Google").Page("Gmail: Email from Google").WebEdit("Email").Set "Shekhar.g"= true Then Msgbox ("Username Does not Exist!") Else msgbox ("Welcome !") End If But still i am getting a syntax error If Browser("Gmail: Email from Google").Page("Gmail: Email from Google").WebEdit("Email").Set "shekhar.g"= true Then Msgbox ("Username Does not Exist!") Else msgbox ("Welcome !") End If I don't feel any thing wrong in this syntax but i don't understand why it shows such error,i am confused what went wrong,please help me out & do the favor,thanks a lot....

1 Answers  


Mention what is the technology used by vb script?

0 Answers  






Input = 124 output should be 124421 Please do not use any string functions/variables

8 Answers   Cap Gemini,


Suppose by navigation I went from 1 st page to 5 page ,so Write a generic script for coming from any page to the 1st page and by executing where the page may be it will come to 1st page

1 Answers   CybAge,


Explain the extension .hta?

0 Answers  


how to comvert 120 into one hunderd twenty rupees only and vice varsa

0 Answers  


what is the features of visual basic?

0 Answers  


hai..friends ....what is the difference between function and sub procedure ....here every one know's theoretically here my question is what is the meaning of function can return the value and sub can't return the value...can you give one example with some values for that ....what does it mean ? how function can return the value...sub can not...any one please...........with example

1 Answers   Cap Gemini,


How to create a function in vbscript?

0 Answers  


Categories