program:  Write a program that determines persistence value of given number.

Input 2 digit positive integer number through keyboard.
e.g. persistence value of 49 is 3. 49,4*9=36, 3*6=18 , 1*8=1.
e.g. persistence value of 77 is 4. 77,7*7=49, 4*9=36, 3*6=18 , 1*8=1.

source file name: persitval.C

void main()
{
int n,d1,d2,pdno,pv;
clrscr();
printf("\n  enter 2 digit number: ");
scanf("%d",&n);
pv=0;
pdno=n;
do
{
d1=n%10;
n=n/10;
d2=n%10;
pv++;
pdno=d1*d2;
n=pdno;
}while(pdno>9);
printf("\n persistence value is %d ",pv);
getch();
}

output: