var integer function real real begin if then if then Exp -2 end var de

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
var x,y:integer;
function f(x,a:real):real;
begin
if x <= a then
f := 1 / (x*x + a*a);
if x > a then
f := Exp(-2*x*x+a*a);
end;
var delta, startPoint, endPoint, currentPoint : real;
begin
startPoint := 0;
endPoint := 3;
delta := 0.2;
currentPoint := startPoint;
while currentPoint <= endPoint do begin
writeln('X: ', currentPoint, ' Fx = ', f(currentPoint, 1.4));
currentPoint := currentPoint + delta;
end;
end.