Verfasst: 30.03.2006 11:01
Kleine Wortspielerei mit dem Thread-Titel:
(H)albernste Umfrage

(H)albernste Umfrage



ts-soft hat geschrieben:Noch liegt die 4 vorne
Code: Alles auswählen
Restore Umfrage
Read max
Dim Umfrage.d(max)
Votes.l
For a = 1 To max
Read Umfrage(a)
Votes + Umfrage(a)
Debug Votes
Next
For a = 1 To max
Umfrage(a) / Votes
E.d + a * Umfrage(a)
Equ.d + a * a * Umfrage(a)
Next
V.d = Equ - E * E
d.d = Sqr(V)
s.s = "Erwartungswert: " + StrD(E, 2) + #CRLF$
s + "Varianz: " + StrD(V, 2) + #CRLF$
s + "Streuung: " + StrD(d, 3) + #CRLF$
s + "Intervall: [" + StrD(E - d, 2) + "; " + StrD(E + d, 2) + "]"
MessageRequester("Umfrage", s)
DataSection
Umfrage:
Data.l 6
Data.d 2, 3, 5, 10, 6, 3
EndDataSection