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

How can constants be declared in the vbscript language?

0 Answers  


Differentiate javascript and vbscript?

0 Answers  


what is visual basic?

2 Answers   Seion Infotech,


In qtp, how to use XML files for framework. if the XML files are more Efficient than Excel files?

1 Answers  


How to Convert Hex color code to color name in VB Script?

0 Answers  






can any body give the code to write the function for given suppose user login with usrer id and pwd to yahoomail.after cliking "sign in"if it is valid user id the next page will display userid'message box.( Note u have to use excel sheet to retrive the userid's data)

3 Answers   Bally Technologies,


How to assign a numeric value to a variable?

0 Answers  


plz give ans to this in vb script........ "krishna radha" i want to print this string "Radha Krishna" like this

5 Answers  


What are the differences between sub procedures and function procedures?

0 Answers  


1) How can we use VB script in testing the application? 2) What all are the things(Software application to be installed in PC) we need to learn VBscript?

0 Answers  


How to replace junk code recorded by QTP with a mall function.

0 Answers  


What are the environments supported by vbscript language?

0 Answers  


Categories