Replacement of zeros

Write a function @replacement(f, g)@ that provided two integer lists f
and g returns the list obtained after replacing the zeros in list f with
values in g. First zero has to be replaced with the first number in g,
the second zero with the second number in g and so on, until there are
no more zeros in f or there are no more available numbers in g. When
values in g have been exhausted no more replacements are done. Lists f
and g do not have to change.

Sample session

Problem information

Author: ProAl

Generation: 2026-01-25T17:03:33.895Z

© Jutge.org, 2006–2026.
https://jutge.org
