Advertisement
Rinaldo-TZ

Calculator (VBScript)

Nov 10th, 2018
122
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. Option Explicit
  2. Dim input1, input2, sign
  3.  
  4. input1 = inputbox ("Type your first number","R-Calculator")
  5. sign = inputbox ("Type in the symbol for your equation","R-Calculator")
  6. input2 = inputbox ("Type your second number","R-Calculator")
  7.  
  8. If sign = "+" Then
  9. msgbox input1 -- input2
  10.  
  11. ElseIf sign = "-" Then
  12. msgbox input1 - input2
  13.  
  14. ElseIf sign = "*" Then
  15. msgbox input1 * input2
  16.  
  17. ElseIf sign = "/" Then
  18. msgbox input1 / input2
  19.  
  20. Else
  21. msgbox "Make sure you typed the correct symbol! You can use these symbols: + - * / "
  22. End If
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement