#include<stdio.h>//header file
#include<conio.h>//header file
int s=1;
int mult(int);
void main() //starting of the main() function
{
int j,n; //declaration of the variables
clrscr();
printf("program for the multiplication of digits of a (+)ve no. by recursion");
printf("\n\n\n\t\t------------INPUT-------------");
printf("\n\nenter the no. whose digits are to be multiplied");
scanf("%d",&n);//taking input from the user
j=mult(n);
printf("\n\n\n\t\t------------OUTPUT------------");
printf("\n\nthe result is:%d",j);//printing output
getch();
}
int mult(int k)
{
int r;
if(k>0)
{
r=k%10;
k=k/10;
s=s*r;
mult(k);
}
else
return(0);
return(s);
}