Ask Question

Name:
Title:
Your Question:

Answer Question

Name:
Your Answer:
User Submitted Source Code!


Description:
  proba
Language: PASCAL
Code:
program HelloWorld;
var
  a,b,c,x1,x2    : real;

begin
  writeln('Unesi a,b i c');
  Readln(a,b,c);
  if a<>0 then
    if b*b-4*a*c>=0 then
     begin
       x1:=(-b+sqrt(b*b-4*a*c))/2*a;      
          x2:=(-b-sqrt(b*b-4*a*c))/2*a;
         writeln('X1=',x1,'X"=',x2);
       end
    else writeln('Nema realnih rešenja')
  else
 begin
     x1=-c/b;
         writeln('X1=',x1);
end;

end.          
Comments: