write a vbscript for finding the sum of the numbers from 1-
50
Answers were Sorted based on User's Feedback
Answer / 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 |
Answer / 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 |
Answer / kishore
dim n
n=inputbox("enter a number")
k=(n*(n+1))/2
msgbox k
| Is This Answer Correct ? | 10 Yes | 13 No |
what is the code in QTP to take screen shot? Please send me any one to my mail id. my mailid is manu.sanepalli@gmail.com
If else for do while select in vb script?
Explain the difference between POST and GET Method.
How to scroll down a page while recording in qtp. suggest me any method apart from low level recording.
how do you make the variable declaration mandatory?what is the use of "option explicit"?
What is a class in CSS?
Which operator is used for fetching the modulus of the 2 numbers in the vbscript language?
Please Example programms on vbscript 1)writing functions and calling functions
i need to sort the data using qtp script for this how i need to write a qtp script
Which constant is used for print and display functions and works as same as pressing enter key?
Explain about the extension .hta?
can anybody tell vb script code for alphanumeric and special character .which is used in qtp the name text field.