Răspuns :
Program ProdusulCifrelor;
var n,r,p : integer;
begin
writeln('Introduceti un numar:');
readln(n);
p:=1;
while n<>0 do
begin
r:=n mod 10;
p:=p*r;
n:=n div 10;
end;
writeln('Produsul cifrelor numarului introdus este:');
writeln(p);
end.
#include <stdio.h>
#include <stdlib.h>
int main()
{
int n,p=1;
scanf("%d",&n);
while (n!=0)
{
p=p*(n%10);
n=n/10;
}
printf("%d",p);
return 0;
}