{
int x;
int count=0;
int temp=0;
x=N;
if(x<0)
x=-x;
do
{
temp=x%10;
if(temp==D)
count++;
x=x/10;
}
while(x>0);
return count;
}
{
int x;
int count=0;
int temp=0;
x=N;
if(x<0)
x=-x;
do
{
temp=x%10;
if(temp==D)
count++;
x=x/10;
}
while(x>0);
return count;
}