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

Answer Posted / jethva_trupti

<html>
<body>

<script type="text/vbscript">
dim n,i,sum
sum=0
i=1
n=5
do while (i<=n)
sum=sum+i
i=i+1
loop
document.write(sum)
</script>

</body>
</html>

Is This Answer Correct ?    60 Yes 15 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How to replace junk code recorded by QTP with a mall function.

1646


i have a problem with this error(this error related edit and delete button,when i click this button in datagrid..i will get this error)"Invalid postback or callback argument. Event validation is enabled using in configuration or <%@ Page EnableEventValidation="true" %> in a page. For security purposes, this feature verifies that arguments to postback or callback events originate from the server control that originally rendered them. If the data is valid and expected, use the ClientScriptManager.RegisterForEventValidation method in order to register the postback or callback data for validation." this is my code : <%@ Page Language="VB" Debug="false" %> <%@ import Namespace="Sytem.Data" %> <%@ import Namespace="System.Data.OleDB" %>

(Search Based On Staff I.C No) IC.No (XXXXXX-XX-XXXX)   ' runat="server"> ' runat="server"> ' runat="server"> ' runat="server"> ' runat="server"> ' runat="server"> ' runat="server"> ' runat="server"> ' runat="server"> ' runat="server"> ' runat="server"> ' runat="server"> ' runat="server"> ' runat="server"> ' runat="server"> Total Leave Taken : Days

2340


In what way program "hello world" you can write in vbscript?

641


What is the difference between a dictionary and an array?

575


What are the disadvantages of vbscript?

648






Explain the asc function?

504


wat is the com(common object model)object for mozilla firefox???????plz if any one know the exact answer....reply me......

1486


hi what is called GUI in QTP 8.2 and how can we test the apllication using GUI?

1782


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?

862


Explain few date functions in vbscript?

612


What is the purpose of on error resume next statement?

575


Explain about scrrun.dll in vbscript?

644


What are the naming conventions while declaring a variable in the vbscript language?

614


what is the standards used for writing the script in QTP

1883


Explain the filter expression?

625