program For;
const
abeg = -3;
aend = 7;
var
a: Integer;
d: Double;
begin
for a := abeg to aend do begin
d := 2 * Sqr (a) + 4 * a - 1;
WriteLn (a :3, d :15 :10);
end;
ReadLn;
end.
Объяснение:
через цикл for
program For;
const
abeg = -3;
aend = 7;
var
a: Integer;
d: Double;
begin
for a := abeg to aend do begin
d := 2 * Sqr (a) + 4 * a - 1;
WriteLn (a :3, d :15 :10);
end;
ReadLn;
end.
Объяснение:
через цикл for