A number is called "descending" if each digit is less than the digit to its left. For example, the number 432 is descending, but 443 and 345 are not.

How many six-digit descending numbers are there?

Guest Feb 23, 2020

#1**+1 **

a=1;b=0;c=0;d=0;e=0;f=0;p=0; cycle:n=a*100000+b*10000+c*1000+d*100+e*10+f; if(a>b and b>c and c>d and d>e and e>f, goto loop, goto next);loop:printn," ",;p=p+1; next:f++;if(f<10, goto cycle, 0);f=0;e++;if(e<10, goto cycle, 0);f=0;e=0;d++;if(d<10, goto cycle,0);f=0;e=0;d=0;c++;if(c<10, goto cycle,0);f=0;e=0;d=0;c=0;b++;if(b<10, goto cycle,0);f=0;e=0;d=0;c=0;b=0;a++;if(a<10, goto cycle,0);print"Total = ",p

**OUTPUT = 210 such numbers**

Guest Feb 23, 2020