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

Answers were Sorted based on User's Feedback



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

Answer / rambabu

This is good for any one

Is This Answer Correct ?    3 Yes 4 No

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

Answer / dipanjan

Dim a, b, c, d As Integer
a = TextBox1.Text
b = TextBox2.Text
c = TextBox3.Text
d = Int(a) + Int(b) + Int(c)
MsgBox (d)

for multiplication:

d = a * b * c
MsgBox (d)

Is This Answer Correct ?    6 Yes 8 No

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

Answer / jansheer

dim a
dim b
dim c
a=cintinputbox("enter first no")
b=cintinputbox("enter second no")
c=a+b
msgbox("sum of "&a&"and"&b&"is")

Is This Answer Correct ?    4 Yes 16 No

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

Answer / amar

addition
dim a
dim b
dim c
c=a+b

Is This Answer Correct ?    9 Yes 23 No

Post New Answer

More VB Script Interview Questions

Description.Create

0 Answers   IBM,


HOw we can apply web service checkpoint in QTP 9.5? I tried it out with net connection also. But not getting success.

0 Answers  


What is the scope of a constant declared using public?

0 Answers  


i want to when we will write the scripts either after getting the build or after getting the SRS?

3 Answers  


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

0 Answers  






How to create a function in vbscript?

0 Answers  


Which respective symbols are used to separate a line and to break the lengthy statement into multiple statements in the vbscript language?

0 Answers  


write a text script to display * as below ********** **** **** *** *** ** ** * * * * ** ** *** *** **** **** **********

1 Answers  


which one is more secure vb script or java script ??????? or both are same ??????

3 Answers  


How to open a file. What is the perpose of true and false mode there?

0 Answers  


How do you declare a variable in vbscript?

0 Answers  


I want to count the total no of links present in yahoo home page. The script like Set fileSysObject=createobject("Scripting.FileSystemObject") Set linksFileName=fileSysObject.opentextfile("D:\samplelinkfile.txt",2,true) Set linkDescObj=description.Create linkDescObj("micclass").value="Link" Set noOfLinks=browser("yahoo").Page("Yahoo!India").ChildObjects(linkDescObj) For i=0 to noOfLinks.count-1 linkName=noOfLinks(i).getROProperty("name") linksFileName.writeline(linkName) Next linksFileName.close Set fileSysObject=nothing But while running the script it is fail (the object not present in the object repository).How to overcome please tell me the detail steps...for QTP9.30

1 Answers  


Categories