Sub arithmetischeOperatoren()
'Dies ist ein Testprogramm fuer Operatoren
Dim x&
Dim y&
Dim z&
'InputBox("Text der erscheinen soll", "Text in der blauen Zeile", StandardWert, Position des Fensters von links, Position des Fensters von oben)
x = InputBox("Bitte geben Sie einen Wert für x ein", "Meldung", 8, 5040, 4300)
y = InputBox("Bitte geben Sie einen Wert für y ein", "Meldung", 15, 5040, 4300)
z = -x
MsgBox ("negatives Vorzeichen " & z & " " & z)
z = y - x
MsgBox ("Subtraktion " & y & "-" & x & " = " & z)
z = y + x
MsgBox ("Addition " & y & "+" & x & " = " & z)
z = y * x
MsgBox ("Multiplikation " & y & "*" & x & " = " & z)
z = y / x
MsgBox ("Division " & y & "/" & x & " = " & z)
'z = y ^ x
'MsgBox ("Potenzieren 7 ^ 3 = " & z)
z = y Mod x
MsgBox ("Modulo-Bildung " & y & "Mod" & x & " = " & z)
z = y \ x
MsgBox ("Integer Division " & y & "\" & x & " = " & z)
Dim v#
v = y / x
MsgBox ("Division, Zuweisung auf einen Double" & y & "/" & x & " = " & v)
v = y \ x
MsgBox ("Integer Division, Zuweisung auf einen Double " & y & "\" & x & " = " & v)
y = InputBox("Geben Sie einen neuen Wert für y ein")
z = y / x
MsgBox ("Division " & y & "/" & x & " = " & z)
z = y \ x
MsgBox ("Integer Division " & y & "\" & x & " = " & z)
End Sub