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

Is vbscript a case-sensitive or case-insensitive?

750


Which object is used to work with the excel sheets in the vbscript language and what statement is used to create this object?

481


How to take whole text output from screen of Bitmap Application.

1868


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

2503


if u ve resrevation for train and u get a number supose 1234xxxokie.after sucessul entering all required fields. now u put that number in search and want to chk wether these ar same or not if both ar same then its okie otherwise test fail.what would be the vb script code for it to compare these two values of different page.

1442






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.

1432


Explain sga memory structures?

577


What is sql loader? Explain the files used by sql loader to load file?

620


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

1339


Can we create Crystal Report object in QTP?If yes then what it is and what are its various properties?

3032


Mention what is the technology used by vb script?

523


Explain the operator precedence in vb script?

650


How to write a VBscript for web page performance test i need a code send if any knows the code If any knows VBScript book plz send to me the link to my mail plz

2389


i need to sort the data using qtp script for this how i need to write a qtp script

3216


What are the 2 ways to pass a value to the function?

511