Ask Question

Name:
Title:
Your Question:

Answer Question

Name:
Your Answer:
User Submitted Source Code!


Description:
  123456
Language: PASCAL
Code:
program HelloWorld;
var a,b,c,D:real;

begin
  writeln('Program pro vypocet kvadraticke rovnice');
read(a);
write(a:0:0,' ');
read(b);
write(b:0:0,' ');
read(c);
write(c:0:0,' ');

d:=b*b-(4*a*c);
if d>0 then 
begin
writeln('rovnice ma 2 reseni',(-b+sqrt(d))/(2*a):0:2);
writeln('rovnice ma 2 reseni',(-b-sqrt(d))/(2*a):0:2);
end
else
writeln('nema reseni');
readln;
readln;
end.          
          
          
          
          
          
          
          
          
          
          
          
          
          
          
Comments: