program ProductOfEvenNumbers;
varn, product, i: integer;
beginwriteln('Enter a natural number: ');readln(n);
product := 1;
for i := 2 to n dobeginif i mod 2 = 0 thenproduct := product * i;end;
writeln('The product of even numbers from 1 to ', n, ' is: ', product);end.
program ProductOfEvenNumbers;
var
n, product, i: integer;
begin
writeln('Enter a natural number: ');
readln(n);
product := 1;
for i := 2 to n do
begin
if i mod 2 = 0 then
product := product * i;
end;
writeln('The product of even numbers from 1 to ', n, ' is: ', product);
end.