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

Answer Posted / chandra

'addition
DIM A
A=INPUTBOX("enter a val")
DIM B
B=INPUTBOX("enter b val")
DIM C
DIM D
C=A+B
MSGBOX C (here output is 1020)

C=INT (A)+INT (B)
MSGBOX C '(HERE OUTPUT IS 30)

D=A*B
MSGBOX D '(OUTPUT IS 200)

Is This Answer Correct ?    50 Yes 29 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Explain How do you create a recordset object in vbscript?

564


What are string functions in vbscript?

656


Hai this is sheik, i want to learn VB scripts for web application pls guide me what are all basic things need to know to learn VB scripts in web application.

1432


how to automatically update the sql server2005 database records when insert in vb6?

1485


Explain about filter expression?

563






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

619


When to use function procedures and what are its characteristics?

548


Mention when to use function procedures and what are its characteristics?

626


Can someone please tell me what poor design in a relational database (not the layout or style) is and how it can be avoided? PLEASE...im desperate.

1413


What are class properties?

650


Is VB Script Case sensitive or Case insensitive?

631


Which object provide information about a single runtime error in a vbscript?

599


Capture the Unique label changes on google home page for I am feeling lucky button and save those label changes to Notepad Note: Using QTP

1871


Hi All, I am facing one problem in QTP. There is link object in my application that exist in the Frame in mozilla firefox. Click event on that object is not working but once the frame is enabled/activated then click event works fine.But the frame does not have the activate property. This problem is coming in firefox only. Regards

2258


What are the differences between sub procedures and function procedures?

519