Sub mittelwert3()
Dim eingabe As Double
Dim summe As Double
Dim anzahl As Integer
summe = 0
anzahl = 0
eingabe = InputBox("Nächste Zahl")
Do Until eingabe = 0
summe = summe + eingabe
anzahl = anzahl + 1
eingabe = InputBox("Nächste Zahl")
Loop
MsgBox ("Mittelwert: " & summe / anzahl)
End Sub