All pastes #755725 Raw Edit

funkcja

public text v1 · immutable
#755725 ·published 2007-10-30 21:15 UTC
rendered paste body
program funkcja;
uses crt;
var
 a,b,c : integer;
 delta: integer;
 x1, x2, x0: integer;
begin
clrscr;
writeln('podaj a');
readln(a);
writeln('podaj b');
readln(b);
writeln('podaj c');
readln(c);
delta := sqr(b) - 4*a*c;
if delta = 0 then
begin
 x0 := round((b*(-1))/(2*a));
 writeln('x0 :', x0);
end;
if delta > 0 then
begin
  x1 := round((b*(-1) - sqrt(delta))/(2*a));
  x2 := round((b*(-1) + sqrt(delta))/(2*a));
  writeln('x1 : ', x1, ' x2: ',x2);
end
else
 Writeln('Brak rozwiazan');
readln;
end.