write a vbscript for finding the sum of the numbers from 1-
50

Answer Posted / ankita

dim i ,n ,sum as integer
n=50
sum=0
for i=1 to n
sum=sum+i

msgbox("sum of 1 o 50 no. =" +sum)
next

Is This Answer Correct ?    19 Yes 7 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How to add actions in driver script to run those actions in QTP?

1513


Explain the filter expression?

626


How will you get a subset of a array in vbscript?

583


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

563


How to take whole text output from screen of Bitmap Application.

1865






I have attended Anovatek Software QTP interview. They will give us computer and one web based application with QTP. We have to automate some records (already updated records or new records) using QTP Data driven testing. But we should use for loop? Can any one know how to do data driven testing using For loop?

1544


How will you get the natural logarithm of the given number in vbscript?

600


Why is error handling required?

567


who will create the object?

1481


what is the difference between modular and data and keyword driven framework

1738


What are the advantages of vbscript?

642


Mention how to access array data?

509


Write a vbscript procedure that converts feet to inches. Hint: there are 12 inches in a foot?

572


what is inner join? what is outer join? what is a constraint? tell me about rdbms? tell me about acid properties?

1430


What is the output of a + b in vbscript if a = 5 and b = 10?

2086