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

in qtp we ve datatable look like excel ,if we want to extract data from excel which saved in my documet how can i get that in datatable using vb script

2 Answers  


when you use For Loop, While..do, do..while? at what situations which loop will use.

1 Answers  


after medical test,when will be the police verification

0 Answers   IBM,


Hai this is sheik, i want to learn VB scripts for web application pls guide me what are all basic things need to know to learn VB scripts in web application.

0 Answers  


Which operator is used for fetching the modulus of the 2 numbers in the vbscript language?

0 Answers  






How strcomp function works?

0 Answers  


how to display all the links in one page using vb script in qtp.

1 Answers   DST Global Solutions,


How will you generate Reports using Vb Script?it asked in testing(QTP)Interview.Plz Any Body Let me know. Thanks uday Uday_testing@yahoo.co.in

4 Answers   NIIT,


1)How to test whether items in a weblist are in alphabetical order or not?

1 Answers   TCS,


how to increasing the numbers in a given text box please write a vb script

0 Answers  


What is the difference between Javascript & Vbscript?

2 Answers  


hai all.iam chandu..please let me know how to test a link in QTP when it is changing at run time..and what property we should take while we r using descriptive programming for a link..

6 Answers  


Categories