Find the number of 10 digit numbers, where the sum of the digits is divisible by 10
There are: 999,999,999 ten-digit numbers that are divisible by 10 as follows in C++:
z=10;a=matrix(11,z);
for(i,0,9,a[1][i]=1);
i=2;
loopi: j=0;
loopj: a[i][j]=sumfor(k,0,9,a[i-1][(j - k + z) % z]);
j++; if(j print 10^(i-1),"-",10^i-1,":", a[i][0] - 1;
i++; if(i
OUTPUT: Between 1,000,000,000 - 9,999,999,999 = 999,999,999 ten-digit numbers that are divisible by 10