program MultiplyDigits;varnum, digit, product: integer;beginwrite('Enter a four-digit number: ');readln(num);
product := 1;
while num <> 0 dobegindigit := num mod 10;product := product * digit;num := num div 10;end;
writeln('The product of all digits in the number is: ', product);end.
program MultiplyDigits;
var
num, digit, product: integer;
begin
write('Enter a four-digit number: ');
readln(num);
product := 1;
while num <> 0 do
begin
digit := num mod 10;
product := product * digit;
num := num div 10;
end;
writeln('The product of all digits in the number is: ', product);
end.