input values to accept 2 numbers & print the product,
difference and sum using switch case
Answer Posted / 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 View All Answers
What are class variables?
What are the 2 ways in which a variable can be declared in the vbscript language?
What are subprocedures in vbscript?
What is the purpose of drive object of scripting.filesystemobject class in vbscript?
What is the use of the formatdatetime function in the vbscript language?
How strcomp function works?
What methods are used to create text files and open text files in the vbscript language?
If a calulator having 3 buttons (of any number)in 3 of them one is not working properly due to which answer is wrong always. write a script to find out which button is not working properly ?
How to assign a numeric value to a variable?
What is select case statement?
What are the advantages of vbscript?
Which object is used to work with the database in the vbscript language and what statement is used to create this object?
How to take whole text output from screen of Bitmap Application.
can anyone send me a vb scripts code for clicking on a link and coming back on home page again does the same for many links on a web page.
write a program to display configuration of a local system with the help of vb script.