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
Explain what is loose binding? Why is it not a good practice to use it?
what is used of Property........End Property loop ? how to write the script for it?
What is the use of option explicit in vbscript?
Mention what is select case statement?
What is the use of option explicit statement?
how does vb script help in web page designing? explain with example.
What is variant in vb script?
how to answer "TELL ME ABOUT UR SELF" as exp.person. whr to start and whr to stop. can anyone tel me
Mention if qtp generates vbscript code as we record actions, can't it possible to directly write using vbscript code when qtp does the same thing too?
what is the differance between BYVAL,BYREF?
How to access array data?
hi all, i had a question, that how to find out hiding a coloumn in a table i had a table having the following column names NAME DESCRIPTION CREATED TIME CREATED USER if i right clicked on a NAME column it will displays a menu having the same column names in a list like NAME DESCRIPTION CREATED TIME CREATED USER with check boxes.if i unched any check box, that column name should not be appear in the main table column names could anyone please solve this problem?
Write a Script for ATM in QTP
Explain about vb script?
What is the difference between function and procedure?