Ответ:
program Calc;
var
k, x, a, c, y: Double;
begin
Write ('k, x, a, c = ');
ReadLn (k, x, a, c);
if x > 0 then begin
y := k * Sqr (x);
WriteLn ('y = ', y);
end else if a + c <> 0 then begin
y := - x / (a + c);
end else
WriteLn ('деление на ноль');
ReadLn;
end.
Copyright © 2024 SCHOLAR.TIPS - All rights reserved.
Answers & Comments
Verified answer
Ответ:
program Calc;
var
k, x, a, c, y: Double;
begin
Write ('k, x, a, c = ');
ReadLn (k, x, a, c);
if x > 0 then begin
y := k * Sqr (x);
WriteLn ('y = ', y);
end else if a + c <> 0 then begin
y := - x / (a + c);
WriteLn ('y = ', y);
end else
WriteLn ('деление на ноль');
ReadLn;
end.