Advertisement
Guest User

Calc.vbs

a guest
Feb 13th, 2016
70
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. Dim a,b,c,d
  2. Do
  3. a = inputBox ("Enter the first number:")
  4. If a = vbClose Then Exit Do
  5. b = inputbox ("Enter the second number:")
  6. If b = vbClose Then Exit Do
  7. c = inputbox ("Enter the action (+, -, * or :):")
  8. If c = vbClose Then Exit Do
  9. if c = "+" then d = cint(a) + cint(b)
  10. if c = "-" then d = cint(a) - cint(b)
  11. if c = "*" then d = cint(a) * cint(b)
  12. if c = ":" then d = cint(a) / cint(b)
  13. MsgBox "Result: "&d
  14. Loop
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement