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

Mention the rules for using option explicit statement?

0 Answers  


write a vb script to open a text file and write into it

2 Answers  


I have a webtable and many objects are embedded in side.(like buttons,checkboxes etc). How to know how many such objects are there? what is the class of that objects?

1 Answers   HP, TCS,


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

0 Answers   Zensar,


What is the use of "Option Explicit"?

2 Answers  






what is fire event method in qtp?

3 Answers   TCS,


Could Anybody Please tell me What is the script for Find 3rd Largest element in the Array without using a SORT function int Find(int arr[], int size); Thanks in Advance..

0 Answers   Amazon,


Set srchobj=Description.Create() srchobj("type").value="text" srchobj("name").value="q" srchobj("html tag").value="input" browser("micclass:=google").Page("micclass:=google").webedit (srchobj).Set "qtp" what's wrong in my code pls tell me ? the above code working fine and i got my result pass,now i am trying to run the program it shows general run time error why?pls help me i am in learning stage ?

0 Answers  


Anyone have qtp11.0 crack?

0 Answers  


what is diff between static and dynaic arrys?

0 Answers  


Mention what is vbscript?

0 Answers  


after medical test,when will be the police verification

0 Answers   IBM,


Categories