Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

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


Please Help Members By Posting Answers For Below Questions

Explain what is loose binding? Why is it not a good practice to use it?

1026


what is used of Property........End Property loop ? how to write the script for it?

2186


What is the use of option explicit in vbscript?

951


Mention what is select case statement?

909


What is the use of option explicit statement?

944


how does vb script help in web page designing? explain with example.

1936


What is variant in vb script?

1092


how to answer "TELL ME ABOUT UR SELF" as exp.person. whr to start and whr to stop. can anyone tel me

1794


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?

957


what is the differance between BYVAL,BYREF?

2219


How to access array data?

945


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?

1948


Write a Script for ATM in QTP

3803


Explain about vb script?

1166


What is the difference between function and procedure?

1141