Prima seventa de program va afisa
d:=a-b (8-4)=4
A doua secventa
m:=a+b+d-2 (8+4+4-2)
m=14
In Pascal programul data arata in felul urmator:
var
a,b,d,m:integer;
begin
a:=8;
b:=4;
if a<b then
d:=b-a
else
d:=a-b;
m:=a+b+d-2;
writeln('Valoarea dorita este=',m);
end.