Ask Question

Name:
Title:
Your Question:

Answer Question

Name:
Your Answer:
User Submitted Source Code!


Description:
  abc
Language: PASCAL
Code:
program HelloWorld;
var
  a, b, c, dis, x1, x2: real;
begin
  writeln('Vvedite a':);
  Readln(a);
  writeln('Vvedite b':);
  Readln(b);
  writeln('Vvedite c':);
  Readln(c);
  dis:= -(b*b)+4*a*c;
  if dis < 0 then
  writeln('Dis < 0')
  else
  if dis = 0 then
  x1:=x2;
  x1:=-b/(2*a);
  else
  x1:=(-b-sqrt(dis))/(2*a);
  x2:=(-b+sqrt(dis))/(2*a);
  writeln('x1= ', x1);
  writeln('x2= ', x2);
end.          
          
Comments: