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

explain with example primitive data types of vb script.

1 Answers  


How you can call vbscript functions?

0 Answers  


How to make sure that items in a wintree are sorted al?

0 Answers   Ness Technologies,


what is test scenario?

1 Answers  


What are the different types of loops available in the vbscript language?

0 Answers  






about vb scripting programs this type of all question& answers

0 Answers  


What are the special sub-types in vbscript?

0 Answers  


Diff between web table ,datatable and data base (QTP)

2 Answers   TCS,


Explain about .wsf files?

0 Answers  


Write a program using Java Script / VBscipt that checks if two matrices have identical values in all the elements

1 Answers   Ignou,


My questions is while writting descriptve programming, lets take flight reservation. Line1: systemutil.Run "D:\Program Files\Mercury Interactive\QuickTestProfessional\samples\flight\app\flight4 a.exe" dialog("text:=Login").WinEdit("attached text:=Agent Name:").Set "mercury" dialog("text:=Login").WinEdit("attached text:=Password:").Set "mercury" dialog("text:=Login").WinButton("text:=OK").click window("text:=Flight Reservation").Activate window("text:=Flight Reservation").ActiveX ("acx_name:=MaskEdBox").Type "111111" window("text:=Flight Reservation").WinComboBox("attached text:=Fly From:").Select "Frankfurt" window("text:=Flight Reservation").WinComboBox("attached text:=Fly To:").Select "London" window("text:=Flight Reservation").WinButton ("text:=FLIGHT").Click window("text:=Flight Reservation").dialog("text:=Flights Table").WinList("text:=From").Select "13536 FRA 08.00AM LON 08.45AM SR $163.00" window("text:=Flight Reservation").dialog("text:=Flights Table").WinButton("text:=OK").Click window("text:=Flight Reservation").WinEdit("attached text:=Name:").Exist window("text:=Flight Reservation").WinEdit("attached text:=Name:").Set "sagar", Now i m getting the error in the last line. it is not accepting the WinEdit("attached text:=Name:") Please do solve this urgent...! and i want to know how to insert additional properties for an object and which properties we need to select from the object spy.

3 Answers  


how to set one column as primary key in QTP and fetch values accordingly

0 Answers   Ford,


Categories