write a vb script to display calculator using case statement?



write a vb script to display calculator using case statement?..

Answer / 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

More VB Script Interview Questions

Which function is used to perform string comparison?

0 Answers  


What's the difference between vbscript and vb.net?

0 Answers  


What methods are used to create text files and open text files in the vbscript language?

0 Answers  


Plzzzzzzz can any one tell me which is the best institute in hyderabad for learing VBScript. plz do answer guys its urgent plzzzzzzz. thanks in advance.

0 Answers  


What is string concatenation function in VBScript?

2 Answers  






if there is any string in a given format like as "company name employeecode date" then we have to fetch employeecode form string for ex-string is "capgemini12345june2013" then we have to fetch 12345 by using vb script so guys how can we do that please reply it.

3 Answers   Cap Gemini,


Which operator can be used to change the value of the operand or change the state of the condition?

0 Answers  


write a vb script to rename a folder from tree4 to tree7

3 Answers  


am giving to one number u can set into that in date format.u can use any methods

1 Answers   HP,


what does create object actually do when you call it in vbscript?

1 Answers   Cap Gemini,


What are the environments supported by vbscript language?

0 Answers  


does anyone have qtp11.0 license key.Please sendit to my mail id-rrvv2011@gmail.com...Thanks

0 Answers  


Categories