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
Set srchobj=Description.Create() srchobj("type").value="text" srchobj("name").value="q" srchobj("html tag").value="input" browser("micclass:=google").Page("micclass:=google").webedit (srchobj).Set "qtp" what's wrong in my code pls tell me ? the above code working fine and i got my result pass,now i am trying to run the program it shows general run time error why?pls help me i am in learning stage ?
What is the use of option explicit in vbscript?
How to take whole text output from screen of Bitmap Application.
Is vbscript a case-sensitive or case-insensitive?
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?
How to assign a date value to a variable?
Hellow friends, I am learning QTP,but here problem is VB script. please guide me how to learn VB script w.r.t QTP and if you know any books tell me or if you have any materials or any use full material or any else w.r.t QTP please post me p.p.sekhar
if u ve resrevation for train and u get a number supose 1234xxxokie.after sucessul entering all required fields. now u put that number in search and want to chk wether these ar same or not if both ar same then its okie otherwise test fail.what would be the vb script code for it to compare these two values of different page.
How to open browser in vb script?
How to write functions and sub in vb script?
What is the difference between javascript and vbscript?
Anyone have qtp11.0 crack?
wat is the com(common object model)object for mozilla firefox???????plz if any one know the exact answer....reply me......
Explain vbscript in detail?
Can u describe what kind of testing are for OTC derivates by banks.