input values to accept 2 numbers & print the product,
difference and sum using switch case



input values to accept 2 numbers & print the product, difference and sum using switch case..

Answer / testengineer

a= Inputbox ("Enter the value of a :: ")
b= Inputbox ("Enter the value of b :: ")
S= int(a)+int(b)
D= int(a)-int(b)
P= int(a)*int(b)
Operation= Inputbox ("1.Sum"&vbnewline& "2.Difference" &vbnewline& "3.Product","Operators")

Select Case Operation
Case 1
Msgbox "Sum = "& S
Case 2
Msgbox "Difference = "& D
Case 3
Msgbox "Product = "& P
Case Else
Msgbox "Invalid Selection"

End Select

Is This Answer Correct ?    3 Yes 2 No

Post New Answer

More VB Script Interview Questions

Join the multiple array with out using JOIN function

1 Answers  


How to open excel in vb script?

0 Answers  


Explain about filter expression?

0 Answers  


Explain the support of asp for vb script functionality?

0 Answers  


What is the difference between javascript and vbscript?

0 Answers  






how to write function to validate the number of characters entering into the text box?

2 Answers   TCS,


Explain different types of segment?

0 Answers  


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

3 Answers  


Explain the extension .hta?

0 Answers  


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

14 Answers  


Hi all..I have two values. a=20 ,b=30 I want to perform c= a+b and c= a*b using user define function.please anyone give the answer

1 Answers  


What is the purpose of folders object of scripting.filesystemobject class in vbscript?

0 Answers  


Categories