Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- program CVUR;
- var a,b,c:integer; d,x1,x2:real;
- begin
- writeln ('Введите коэффиценты: ');
- read (a,b,c);
- d := b*b - 4 * a * c;
- if (d > 0) then begin
- x1 := (-b + exp(1/2 * ln(d))) / (2 * a);
- x2 := (-b - exp(1/2 * ln(d))) / (2 * a);
- writeln ('Корни = ', x1,' ', x2);
- end
- else if (d = 0) then begin
- x1 := -b / (2*a);
- write ('1 корень = ', x1);
- end
- else
- writeln ('Решений нет!');
- end.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement