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

what is fire event method in qtp?

3 Answers   TCS,


Input = 124 output should be 124421 Please do not use any string functions/variables

8 Answers   Cap Gemini,


Plz give the vb script for the following scenerio. In travel booking we have to select from delhi to mumbai from the combobox The prices will be display in another combo box .But i have to select the lowest price for it and submit it

1 Answers   IBM,


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

1 Answers  


what types of bugs will we find out in banking projects for automation testing?

0 Answers   Napier Healthcare, TCS,






Mention how to assign a date value to a variable?

0 Answers  


What are the differences between sub procedures and function procedures?

0 Answers  


How can the spaces from the string be removed?

0 Answers  


what is event handling?

0 Answers  


Inorder to avoid Message box while writing script which alternative method can be used?

1 Answers  


Could Anybody tell me VBScript for Check if a given number is Prime number-Don't use any Built- in Functions Boolean/int is Prime(int number).. Thanks in advance.

12 Answers   Amazon, Pyroferus,


hi, How will write a regular expression of date in VB scripting.

1 Answers  


Categories