На Python:
n = input()
p = 1
for i in n:
if int(i)%2 == 0:
p *= int(i)
print(p)
Python (1 var.):
n = int(input())
pr = 1
while n > 0:
if n % 2 == 0:
pr = pr * (n % 10)
n = n // 10
print(pr)
Python (2 var.):
if int(i) % 2 == 0:
pr = pr * int(i)
Pascal:
var n, pr: integer;
begin
readln(n);
pr := 1;
while n > 0 do begin
if n mod 2 = 0 then
pr := pr * n mod 10;
n := n div 10;
end;
writeln(pr);
end.
На Python:
n = input()
p = 1
for i in n:
if int(i)%2 == 0:
p *= int(i)
print(p)
Python (1 var.):
n = int(input())
pr = 1
while n > 0:
if n % 2 == 0:
pr = pr * (n % 10)
n = n // 10
print(pr)
Python (2 var.):
n = input()
pr = 1
for i in n:
if int(i) % 2 == 0:
pr = pr * int(i)
print(pr)
Pascal:
var n, pr: integer;
begin
readln(n);
pr := 1;
while n > 0 do begin
if n mod 2 = 0 then
pr := pr * n mod 10;
n := n div 10;
end;
writeln(pr);
end.