Given a positive integer with no more than 5 digits, how many digits is it?

Find the number on each digit separately, and the relationship is as follows:
find the number in the tens of thousands: ten_thousand=num/10000;
find the number in the thousands: thousand=(num%10000)/1000;
find the number in the hundreds: hundreds =(num%1000)/100;
find the number in the ten place: ten=(num%100)/10;
find the number in the one place: indiv=num%10;

Guess you like

Origin blog.csdn.net/m0_51955470/article/details/112255384