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 are the 2 ways to pass a value to the function?
Could Anybody tell me the Script for REVERSE an Interger int reverse(int num) Ex:246 to 642.. Thanks in Advance.
How to write VB script for login module?
A folder is there inside no of textfiles are avilable. How do count the textfiles. Normally folder means we are using subfolder methods but textfiles is not working for subfolder methods and how do get file name also.
why variable name should not exceed 255 characters?
what is visual basic?
write a vb script to display calculator using case statement?
How can you fetch the value of a cookie?
what does create object actually do when you call it in vbscript?
i created script for login in QTP,i parametirized that using global sheet,problem i am facing is first i want to login with first values provided in excelsheet and want to perform some operation,second time if call same action it should login with second values in excelsheet
Could Anybody tell me VBScript for Check if a given number is Prime number-Don't use any Built- in Functions Boolean/int is Prime(int number).. Thanks in advance.
Which respective symbols are used to separate a line and to break the lengthy statement into multiple statements in the vbscript language?