how to write basic programs in VB Script like addition,
multiplication?

Answer Posted / pravati

Call sum(x,y)
Function sum(x,y)
x=cint(inputbox ("enter a no"))
y=cint(inputbox ("enter a no"))
z=inputbox("enter the value")

Select Case z
Case "+" msgbox x+y
Case "-" msgbox x-y
End Select
End Function

Is This Answer Correct ?    1 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

how to comvert 120 into one hunderd twenty rupees only and vice varsa

2013


how to check whether link is disabled in QTP??

5822


I have attended Anovatek Software QTP interview. They will give us computer and one web based application with QTP. We have to automate some records (already updated records or new records) using QTP Data driven testing. But we should use for loop? Can any one know how to do data driven testing using For loop?

1744


Which object is used to work with the excel sheets in the vbscript language and what statement is used to create this object?

694


Hellow friends, I am learning QTP,but here problem is VB script. please guide me how to learn VB script w.r.t QTP and if you know any books tell me or if you have any materials or any use full material or any else w.r.t QTP please post me p.p.sekhar

2220


What is the output of a + b in vbscript if a = 5 and b = 10?

2760


What purpose does ‘on error resume next’ serves?

781


Description.Create

2363


who will create the object?

1905


How strcomp function works?

841


How will you get a subset of a array in vbscript?

755


what is the use of QCUtil? explain with one example?

6645


What is the main difference between function and sub-procedure?

764


How will you get the smallest subscript of an array in vbscript?

1093


i wrote vbscripit code in notepad i got error i am in learning stage if u ps tell me what wrong in my code my error is "object required descriptive at line one run time error"and my code is "set usernameobj=Descriptive.Create() usernameobj( "name").value="Username" set passwordobj=Descriptive.Create() passwordobj("name").value="password" set signinobj=Descriptive.Create() signinobj("name").value="sigin" browser("gmail").page("gmail").WebEdit("usernameobj").set ("enter username") Browser("gmail").Page("gmail").WebEdit("passwordobj").Set secure.Crypt.Encrypt("enter password") browser("gmail").page("gmail").WebButton("siginobj").click

1621