write a vb script to display calculator using case statement?

Answer Posted / mudaseer

a=cint(inputbox("enter the value"))
b=cint(inputbox("enter the value"))
vchoice=inputbox("enter the value")
select case vchoice
case "+" msgbox a+b
case "-" msgbox a-b
case "*" msgbox a*b
case "/" msgbox a/b
case "\" msgbox a\b
case "mod" msgbox a mod b
case "&" msgbox a & b
case "^" msgbox a ^ b
case else msgbox "invalid"
end select

by mudaseer20@gmail.com

Is This Answer Correct ?    16 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Can anyone send me a vb script function for verifying the functionality of active links on a web page

1767


Explain different types of segment?

777


Explain about the support of asp for vb script functionality?

713


How can you fetch the value of a cookie?

755


Which operator is used to concatenate the 2 values in the vbscript language?

767


Hellow friends, I am learning QTP,but here problem is VB script. please guide me how to learn VB script w.r.t QTP and if you know any books tell me or if you have any materials or any use full material or any else w.r.t QTP please post me p.p.sekhar

2210


why do u choose to go for testing why cant for devoloping

1811


Write program for identifyig duplicates in flight Departing from and Arriving in mercury tours(web application).

1658


What is the use of the recordset object and which statement is used to create such an object?

739


Which constant is used for print and display functions and works as same as pressing enter key?

754


Which in-built function related to an array joins substrings into one string in the vbscript language?

707


how to increase the values in text box in a given text box increament by two values by clicking on button

1853


write a function to read the items from combobox of Flight reservation & save in excel (QTP)??

2584


Mention what if you do not specify anything when you call a procedure?

751


who will create the object?

1703