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

Hi anyone Can Send Solution to the Question wt m posting now Prepare Script for the Bellow Scenario? Login to Gmail Page Open Inbox check Mails save them in a Folder

1578


What is sql loader? Explain the files used by sql loader to load file?

628


How do you declare a variable in vbscript?

633


Explain about scrrun.dll in vbscript?

658


Write a function for Instr(). We need to write a function that works as same as Instr(). Code or Even pseudo code is good enough for me.?

2039






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

2583


hi i am trying for testing job for 3+ experience(fake) can u suggest me what type of projects i can keep in my resume and how much of knoeledge i should have abt that project.thnks in advance.urgt plz

2590


Write a Script for ATM in QTP

3347


wat is the com(common object model)object for mozilla firefox???????plz if any one know the exact answer....reply me......

1497


How to use QTP Object in .vbs(vbscript file) file Ex: Browser().., wait(), exist() and etc...

2907


How will you get a string with the specified character the specified number of times in vbscript?

579


What is the difference between javascript and vbscript?

538


What is the difference between vb debugger and the script debugger?

599


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

574


Write program for identifyig duplicates in flight Departing from and Arriving in mercury tours(web application).

1444