write a vb script to display first 5 odd numbers from 1 to 100
Answer Posted / psri
dim a(50)
j=0
for i = 1 to 100
if (i mod 2) <> 0 then
a(j)=i
j=j+1
cnt=cnt+1
End if
next
msgbox "The odd no is "& join(a) &"The total no of odd no's
is"&cnt
| Is This Answer Correct ? | 2 Yes | 3 No |
Post New Answer View All Answers
regular expression that will recognize a browser as long as its name property starts with mybrowser
How will you get a random number between 0 and 1 in vbscript?
after medical test,when will be the police verification
How are arrays declared in the vbscript language?
How to scroll down a page while recording in qtp. suggest me any method apart from low level recording.
What are the data types supported by vbscript?
why variable name should not exceed 255 characters?
Hi, Can anyone please send me vb script examples to practice vb and also material to learn vb scripting in QTP? my email id : hareen_11@yahoo.com
Which in-built functions are used to convert the specified expression in the form of date and string in the vbscript language?
What is the purpose of regexp object in vbscript?
What is Procedure or Subroutine in VB Script?
What are subprocedures in vbscript?
I have an excel sheet with multiple ID's in a column. Now i need fetch those ID's in an application and check whether if it already exist in the DB. If not then i have to go with the process of inserting them in the DB. If it exists then i need to skip that ID and move to the next ID and check the same and proceed. How can i do that with for loop and if condition?
Which respective symbols are used to separate a line and to break the lengthy statement into multiple statements in the vbscript language?
What is the purpose of the err object in the vbscript language?