karimakamboua12
Posts Sunday February 7, 2016Registration date
January 13, 2018
Last seen

Jan 13, 2018 at 08:04 PM  Latest reply: Ambucias51180
Posts Monday February 1, 2010Registration dateModeratorStatus
April 25, 2018
Last seen
 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).
Correction
FUNCTION CALC_DELTA(A :ENTIER ,B :ENTIER ,C :ENTIER) :ENTIER
VARIABLES: D, X1, X2: INTEGER
D<B*B4*A*C;
RETURN DEL
END FUNCTION
Write('Input A');
Read(A)
Write('Input B')
Read(B)
Write('Input C')
Read(C)
Write( "the discriminant is:")
If D <0 then
Show "Delta is negative, trinome has no real roots"
Else
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 = Bracined) / 2A and x2 = b + racined / 2a
End
Thanks in advance