rohan #include int main() { int i,j,k,num,rem[3],sum,count=0,counter=0; printf(“enter the number”); scanf(“%d”,&num); sum=num; while(sum!=0) { sum/=10; ++counter; } sum=num; for(i=0;i<counter;i++) { rem[i]=sum%10; sum=sum/10; } for(i=0;i<counter;i++) printf("%d",rem[i]); for(i=0;i<counter;i++) { if(num%rem[i]==0) count++; } printf("\nnumbers divisible by given number are %d",count); return 0; } Log in to Reply
TADEPALLI #include int main() { int m; scanf(“%d”,&m); while(m!=0) { long int n,temp; int i,count=0,rem; scanf(“%ld”,&n); temp=n; while(temp!=0) { rem=temp%10; if(rem!=0&&n%rem==0) count++; temp=temp/10; } printf(“%d\n”,count); m–; } return 0; } Log in to Reply
#include
int main()
{
int i,j,k,num,rem[3],sum,count=0,counter=0;
printf(“enter the number”);
scanf(“%d”,&num);
sum=num;
while(sum!=0)
{
sum/=10;
++counter;
}
sum=num;
for(i=0;i<counter;i++)
{
rem[i]=sum%10;
sum=sum/10;
}
for(i=0;i<counter;i++)
printf("%d",rem[i]);
for(i=0;i<counter;i++)
{
if(num%rem[i]==0)
count++;
}
printf("\nnumbers divisible by given number are %d",count);
return 0;
}
#include
int main()
{
int m;
scanf(“%d”,&m);
while(m!=0)
{
long int n,temp;
int i,count=0,rem;
scanf(“%ld”,&n);
temp=n;
while(temp!=0)
{
rem=temp%10;
if(rem!=0&&n%rem==0)
count++;
temp=temp/10;
}
printf(“%d\n”,count);
m–;
}
return 0;
}