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 |
Which data type/types are supported by vbscript language and what are their specialties?
what is diff between static and dynaic arrys?
write a vb script to add two 2*2 matrix
How to get the length of the string by making use of the string function?
Mention the rules for using option explicit statement?
What is the event handling in vbscript?
Can u describe what kind of testing are for OTC derivates by banks.
Mention when to use function procedures and what are its characteristics?
How will you convert a string to upper case string using vbscript?
Hi, Anybody could tell me What is the script for Reverse of Given number. Ex:236--632. Thanks in Advance..
we executed QTP scripts in one browser(i.e IN)same scripts is working on another browsers or not (i.e mean netscap,m azol..like )
Mention how to assign a date value to a variable?