Monday 6 March 2017

Calculator by VB Script Tutorial



This video is related to VB Script in which we can select our required operation and get the output.
//
varchoice= lcase (inputbox ("Enter your choice of operation; a- addition , s- Subtraction, m-Multiplication, d- Division"))
a=cdbl(inputbox ("Enter the 1st value"))
b=cdbl(inputbox ("Enter the 2nd value"))

select case varchoice
 case "a"
 msgbox (a+b)
 case "s"
 msgbox (a-b)
 case "m"
 msgbox (a*b)
 case "d"
 msgbox (a/b)
 case else
 msgbox "Input is Wrong"
end select
//


                                                                         

No comments:

Post a Comment