Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


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

Answers were Sorted based on User's Feedback



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

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

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

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

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

Answer / kishore

dim n
n=inputbox("enter a number")
k=(n*(n+1))/2
msgbox k

Is This Answer Correct ?    10 Yes 13 No

Post New Answer

More VB Script Interview Questions

write a program to display the system specifications of client system with the help of vbScript.

0 Answers  


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

2 Answers  


Why is the use of exit do or exit for statements within loops discouraged?

0 Answers  


Can anyone help me in write coding to get this pattern * ** *** ****

3 Answers  


What is purpose of scripting.filesystemobject class in vbscript?

0 Answers  


create a form to accept username and password validate the username and password with using message box, display the corresponding user message

0 Answers   CSC,


What is wrong with the following code: <%afname="header.asp"%><!?#include file ="<%=afname%>"?>

1 Answers  


What methods are used to create text files and open text files in the vbscript language?

0 Answers  


Is it possible to pass optional argument to function in vb script?

2 Answers  


How will you get a combined string from array of string in vbscript?

0 Answers  


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

3 Answers  


write a vb script to find simple interest using functions

1 Answers  


Categories