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

Why to use option explicit in vb script?

0 Answers  


What is vbscript language used for and which earlier language is it modeled upon?

0 Answers  


what is resorceallocation

0 Answers  


How to write functional test cases for send button in gmail.

2 Answers   Arctern,


who will create the object?

0 Answers   TCS,


write a program to display configuration of a local system with the help of vb script.

0 Answers  


we executed QTP scripts in one browser(i.e IN)same scripts is working on another browsers or not (i.e mean netscap,m azol..like )

6 Answers   Accenture,


when you use For Loop, While..do, do..while? at what situations which loop will use.

1 Answers  


Differentiate javascript and vbscript?

0 Answers  


How to remove the spaces in a string Ex: "this is apple"

5 Answers   Cap Gemini,


Which keyword is used to declare a variable in the vbscript language?

0 Answers  


How to find arry size in qtp vb script

2 Answers   Cap Gemini,


Categories