Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

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


Please Help Members By Posting Answers For Below Questions

Which in-built functions are used to convert the specified expression in the form of date and string in the vbscript language?

992


What are the different types of operators and their order of precedence?

1029


Which function allows you to instantiate an object given its programmatic identifier or progid?

1014


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

1839


How to create a cookie using vbscript?

1178


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.

2085


How will you get a combined string from array of string in vbscript?

932


Which keyword is used to declare a variable in the vbscript language?

931


Illustrate briefly about the different types of statement

2490


In what way program "hello world" you can write in vbscript?

1119


What is the difference between for loop and while loop?

1034


Which in-built function is used to format the number in the vbscript language?

1000


Explain about operator precedence in vb script?

1054


Explain the tristate constants in vbscript?

1006


How can constants be declared in the vbscript language?

977