Posts Sunday February 7, 2016Registration date
January 13, 2018
Jan 13, 2018 at 08:04 PM - Latest reply: Ambucias51180
Posts Monday February 1, 2010Registration dateModeratorStatus
April 25, 2018
- Jan 14, 2018 at 07:34 AM
Hello, I hope u are well ...
If possible, is this treatment of Algo correct!! here is the excercise...
Write a function that recieves 3 parameters(A, B and C) and calculates the discriminant DELTA of trinomial of second degree AX2 + BX + C and which, according to its sign, calculates the real roots of the trinomial , and if necessary displays that there is no real root. The three coefficients A, B and C will be keyed in by the user(in main programme).
FUNCTION CALC_DELTA(A :ENTIER ,B :ENTIER ,C :ENTIER) :ENTIER
VARIABLES: D, X1, X2: INTEGER
Write( "the discriminant is:")
If D <0 then
Show "Delta is negative, trinome has no real roots"
If dD = 0 then
Write ( "the trinoma has a root";x=takes the value -b / 2a)
If D> 0 then
Write "the trinoma has two distinct roots: x1 = -B-racined) / 2A and x2 = -b + racined / 2a
Thanks in advance