Beruflich Dokumente
Kultur Dokumente
Sub calculation()
current = CDbl(TextBox1.Text)
If current = 0 Then
MessageBox.Show("Division by Zero is Undefined.")
End If
Select Case calcFunc
Case "add"
previous = previous + current
Case "sub"
previous = previous - current
Case "mult"
previous = previous * current
Case "div"
previous = previous / current
End Select
TextBox1.Text = previous
status = False
End Sub
End Sub
End Sub
End Sub
End Sub
End Sub
Sub calcStat()
'Accepts the Amount of the Number you like to Calculate
amu = InputBox("How many Numbers do you want to Calculate", "STATISTICS
CALCULATOR")
'Calculating Median
If amu Mod 2 = 0 Then 'If amu remainder is zero it is even else it is odd
Array.Sort(num)
median = (num(amu / 2 - 0.5) + num(amu / 2 + 0.5)) / 2
Else
Array.Sort(num)
median = num(amu / 2 + 0.5)
End If
'calculating variance
For i = 0 To amu - 1
varT += Math.Pow(2, num(i))
Next
vari = varT / amu
End Sub
End Sub
End Sub
End Class