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
what is the differance between BYVAL,BYREF?
please can you help me to get a code of flames using a visual basic 6
what is resorceallocation
Compare java script and vb script?
How to get the length of the string by making use of the string function?
Mention how to access array data?
Which object is used to work with the excel sheets in the vbscript language and what statement is used to create this object?
Mention if qtp generates vbscript code as we record actions, can't it possible to directly write using vbscript code when qtp does the same thing too?
Which operator can be used to do an xor operation in vbscript?
How to throw an error in vbscript?
How to Import data from a file (file is on the desktop) to the data table
In what way program "hello world" you can write in vbscript?
Which object provide information about a single runtime error in a vbscript?
Explain about the functionality of vb script?
What purpose does ‘on error resume next’ serves?