24 lines
496 B
Text
24 lines
496 B
Text
multiple: procedure options (main); /* 29 April 2014 */
|
|
|
|
declare n fixed binary (31);
|
|
|
|
find_mdr: procedure;
|
|
declare (mdr, mp, p) fixed binary (31);
|
|
|
|
mdr = n;
|
|
do mp = 1 by 1 until (p <= 9);
|
|
p = 1;
|
|
do until (mdr = 0); /* Form product of the digits in mdr. */
|
|
p = mod(mdr, 10) * p;
|
|
mdr= mdr/10;
|
|
end;
|
|
mdr = p;
|
|
end;
|
|
put skip data (n, mdr, mp);
|
|
end find_mdr;
|
|
|
|
do n = 123321, 7739, 893, 899998;
|
|
call find_mdr;
|
|
end;
|
|
|
|
end multiple;
|