VBcoders Guest



Don't have an account yet? Register
 


Forgot Password?



Quadratische Gleichung

by Ascher Stefan (8 Submissions)
Category: Math/Dates
Compatability: Visual Basic 4.0 (32-bit)
Difficulty: Unknown Difficulty
Originally Published: Mon 7th June 1999
Date Added: Mon 8th February 2021
Rating: (1 Votes)

Quadratische Gleichung

API Declarations


ZweiEchteWurzeln ' 2 real
EineEchteWurzel ' 1 real, 1 imaginaer
ZweiImaginaereWurzeln ' 2 imaginaer
'EineEchteZweiImaginaereWurzeln
'DreiEchteWurzeln
End Enum


Rate Quadratische Gleichung



alphaReal As Double, betaReal As Double, alphaImag As Double, _
betaImag As Double) As QKTypConst
    Dim d As Double, X As Double, x1 As Double
    d = (b ^ 2) - (4 * a * c)
    
    If d > 0 Then
        alphaReal = (-b + Sqr(d)) / (2 * a)
        betaReal = (-b - Sqr(d)) / (2 * a)
        QuadratischeGleichung = ZweiEchteWurzeln
    ElseIf d = 0 Then
        alphaReal = (-b) / (2 * a)
        QuadratischeGleichung = EineEchteWurzel
    Else
        alphaReal = ((Sqr(-d) / (2 * a)))
        alphaImag = ((-b) / (2 * a))
        betaReal = -((Sqr(-d) / (2 * a)))
        betaImag = ((-b) / (2 * a))
        QuadratischeGleichung = ZweiImaginaereWurzeln
    End If

End Function


Download this snippet    Add to My Saved Code

Quadratische Gleichung Comments

No comments have been posted about Quadratische Gleichung. Why not be the first to post a comment about Quadratische Gleichung.

Post your comment

Subject:
Message:
0/1000 characters