1234567891011
void suma(int chislo, int i) { if(i > n) return; //supposse i == n here int buf; int buf2 = pow(10, n - 1 - i); //n - 1 - n = -1, 10^-1 = 0.1 -> int(0.1) = 0 buf = chislo % buf2; //division by 0 a[i] = chislo / buf2; //division by 0 suma(buf, i + 1); }
12
int n; int *a=new int[n]; //¿what's the value of `n' right at this point?