program
multiplication_signe;
var
a, b, c, delta, s1, s2: real;
begin
writeln(' http://www.Software-DS.com');
writeln('a*x^2+b*x+c=0');
writeln;
{ Saisie des
valeurs }
write('a= ');
readln(a);
write('b= ');
readln(b);
write('c= ');
readln(c);
{ Calcul de
delta }
delta := b * b - 4 * a * c;
{ Debut de
l'analyse }
if delta > 0 then
begin
writeln(' Think Different !');
s1 := (-b - sqrt(delta)) / (2 * a);
s2 := (-b + sqrt(delta)) / (2 * a);
writeln(' Voici les 2 solutions
reels : ');
writeln(' x1= ', s1 : 2 : 3, ' x2=
', s2 : 2 : 3);
end
else if delta = 0 then
writeln('Il y a une racine double: x= ', (-b - sqrt(delta))
/ (2 * a) : 2 : 3)
else
writeln('il n'' y a pas de racines reelles !');
writeln('Pour d''autres programmes avec codes sources en
Pascal et C: http://www.Software-DS.com');
(* ©2001
All Rights Reserved to http://www.Software-DS.com
26/09/01 *)
end.
|