write a vb script to display first 5 odd numbers from 1 to 100
Answer Posted / eswar
cnt =0
For i=1 to 100
If (i mod 2 <> 0) Then
MsgBox i
cnt=cnt+1
End If
If cnt=5 Then
Exit for
End If
Next
| Is This Answer Correct ? | 7 Yes | 3 No |
Post New Answer View All Answers
Which in-built functions are used to convert the specified expression in the form of date and string in the vbscript language?
What are the different types of operators and their order of precedence?
Which function allows you to instantiate an object given its programmatic identifier or progid?
i wrote vbscripit code in notepad i got error i am in learning stage if u ps tell me what wrong in my code my error is "object required descriptive at line one run time error"and my code is "set usernameobj=Descriptive.Create() usernameobj( "name").value="Username" set passwordobj=Descriptive.Create() passwordobj("name").value="password" set signinobj=Descriptive.Create() signinobj("name").value="sigin" browser("gmail").page("gmail").WebEdit("usernameobj").set ("enter username") Browser("gmail").Page("gmail").WebEdit("passwordobj").Set secure.Crypt.Encrypt("enter password") browser("gmail").page("gmail").WebButton("siginobj").click
How to create a cookie using vbscript?
Hi Friends Rajendra this is bhavani prasad, iam working Hyderabad. i faced one problem with qtp recording mode i.e in my application there is 100 records first we click the first record that record will be jumped to next session and 99 records will there stop the recording and run the same script .Run this script qtp does not identify the records. So plz tell me what is the solution.
How will you get a combined string from array of string in vbscript?
Which keyword is used to declare a variable in the vbscript language?
Illustrate briefly about the different types of statement
In what way program "hello world" you can write in vbscript?
What is the difference between for loop and while loop?
Which in-built function is used to format the number in the vbscript language?
Explain about operator precedence in vb script?
Explain the tristate constants in vbscript?
How can constants be declared in the vbscript language?