Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

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

Difference between dim,public and private variables in vb script?

996


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

1044


Explain about constants in vb script?

1077


How to delete a cookie using vbscript?

1208


What is vbscript?

1168


What are the rules to name variable in vbscript?

1133


What is the extension of the vbscript file?

1112


What are the data types supported by vbscript?

1172


Program to use input box and send even numbers into sheet1 and odd numbers into sheet2 and prime numbers into sheet3 using vbscript(QTP)?

3090


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

1069


Which in-built function is used to format the number in the vbscript language?

1049


how to operate webobjects in a webpage using getobject function and then using generic methods?

3158


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

1076


How will you get the octal value of the given number in vbscript?

1018


What are keywords in the vbscript language?

1075