with Ada.Numerics.Elementary_Functions; use Ada.Numerics.Elementary_Functions; package body kvadrov is procedure Quadra (A, B, C : in Float; R1, R2, I1, I2 : out Float; Result : out Character) is D, Z : Float; begin D := B**2 - 4.0 * A * C; Z := 2.0 * A; if D < 0.0 then Result := 'K'; R1 := -B / Z; R2 := R1; I1 := Sqrt (-D) / Z; I2 := -Sqrt (-D) / Z; elsif D = 0.0 then Result := 'D'; R1 := -B / Z; R2 := R1; I1 := 0.0; I2 := I1; else Result := 'R'; R1 := (-B + Sqrt (D)) / Z; R2 := (-B - Sqrt (D)) / Z; I1 := 0.0; I2 := I1; end if; end Quadra; begin null; end kvadrov;