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

Out of the different type of operators, which are evaluated first and last in the vbscript language?

0 Answers  


write a vb script to generate 3*3 matrix

2 Answers  


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

1 Answers   HP,


Please let me Know regarding any material regarding VB Scripting which should be easily understandable for Beginners.

0 Answers  


How to assign a date value to a variable?

0 Answers  


How to generate 3 digit random number?

3 Answers   IBM, Virtusa,


please can you help me to get a code of flames using a visual basic 6

0 Answers  


Explain the difference between POST and GET Method.

1 Answers  


What is difference between vbscript and vba?

0 Answers  


Hi, Anybody could tell me What is the 3rd Largest Number in the series..Thanks in Advance..

3 Answers   Amazon, bcbs,


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

3 Answers  


I want to count the total no of links present in yahoo home page. The script like Set fileSysObject=createobject("Scripting.FileSystemObject") Set linksFileName=fileSysObject.opentextfile("D:\samplelinkfile.txt",2,true) Set linkDescObj=description.Create linkDescObj("micclass").value="Link" Set noOfLinks=browser("yahoo").Page("Yahoo!India").ChildObjects(linkDescObj) For i=0 to noOfLinks.count-1 linkName=noOfLinks(i).getROProperty("name") linksFileName.writeline(linkName) Next linksFileName.close Set fileSysObject=nothing But while running the script it is fail (the object not present in the object repository).How to overcome please tell me the detail steps...for QTP9.30

1 Answers  


Categories