write a vb script to print even numbers from 1-50?

Answer Posted / pradeep

For i=1 to i=50
if (i mod 2=0)then
messagebox i&"is even number"
else
messagebox i&"is odd number"
endif
next

Is This Answer Correct ?    23 Yes 36 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Explain how you can delete excel file in qtp?

585


I had installed QTP 9.2. It is working fine but whenever I open QTP, it is trying to reinstall the below-mentioned files again and again "QTP92PS82UPGRADE.exe", "recogn.dll". If anybody has these files, please provide those files in this site or you can send that files to my mail id also (lravi4u@yahoo.com). If you don't know where the files will be in the QTP, search in the QTP software CD or path of QTP program installed (C:\Program Files\Mercury Interactive\QuickTest Professional)

1452


When should I use smart identification?

600


How will you declare a variable in qtp?

549


The structure of keyword driven frame work is like a folder structure the different sub folder are 1-functional libray folder 2-object repository folder 3- database folder 4-appliction1.xls 5-initalzation vbs file 6-sequence file 7-driver script 8-test case list file My question is whether these are in a local server machine or in our pc.((whether It like Vss). can u give example of driver script(code)

2800






what is error and fault in terms of software quality?

1455


In qtp, how you can use xpath to identify objects?

612


Which advantages helping QTP to hold the position of "Market Leader" for such a long period?

1382


hi all here i have tab named "Workbench" By clicking on "workbench" tab.it displays 4 tabs like below workbench common cargo commercial charter "common" tab have 10tabs inside,"cargo" tab also haveing 15 tabs inside and remaining two tabs also having few tabs inside. when clicked on "common" tab.it displaying the script like tab("workbench").select"common" if i clicked on "cargo".it displaying the script like tab"workbench_2").select"cargo" if i clicked on "commercial".it displaying the script like tab"workbench_3").select"commercial" if i clicked on "charter".it displaying the script like tab"workbench_4").select"charter" I have used a "FOR LOOP" for common,commercial,cargo,charter tabs.it was stopped at second tab SO, CAN I RECOGNIZE "WORKBENCH_2,_3,_4" AS A SINGLE VARIABLE if not, can anyone plese help me to solve this

1513


How do you compare the structure of 2 tables in database and check whether they are similar using qtp.

1473


what is meant by Implicit and explicit requirements?

3617


why should we give deliver good quality software?

1625


How does qtp identify gui object?

584


How to do call a output parameter from one action to another action??/

1870


QTP script is not working on other's machine..

1531