90.5k views
0 votes
#include <stdio.h>

void foo(int n, int sum)
{
int k = 0, j = 0;
if (n == 0) return;
k= n % 10;
j = n/10;
k = sum *k;
sum = sum *k + 1;
foo (j, sum);
printf ("%d", k%10);
}
int main()
{
int a = 5179, sum = 2;
foo (j, sum);
printf("%d",k%10);
}
int main()
{
int a =5179,sum=2;
foo(a,sum);
printf("%d",sum);
getchar();
}​

User Symlink
by
3.8k points

1 Answer

3 votes
what’s ur questions tho
User Strubbl
by
3.5k points