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

1807


What is the purpose of the err object in the vbscript language?

630


Explain some uses of vb script?

556


Explain about operator precedence in vb script?

579


What's the difference between vbscript and vb.net?

555






What is the difference between function and procedure?

579


Mention what is variant in vbscript?

561


How to Enter Values on the Command promt using VB script

1534


How to capture a runtime error in vbscript?

631


How will you get the exponent of the given number in vbscript?

565


Explain about arrays in vb script?

608


Write a Program to add 2 numbers without using operators (+,-) and without using third variable. Note: Use VBScript only Hint: You can use other operators like '/' & '*'(Division & Multiplication)

3194


Write program for identifyig duplicates in flight Departing from and Arriving in mercury tours(web application).

1444


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

513


Set srchobj=Description.Create() srchobj("type").value="text" srchobj("name").value="q" srchobj("html tag").value="input" browser("micclass:=google").Page("micclass:=google").webedit (srchobj).Set "qtp" what's wrong in my code pls tell me ? the above code working fine and i got my result pass,now i am trying to run the program it shows general run time error why?pls help me i am in learning stage ?

1554