[Solved] challenging question on alteration of how numbers count on c++ or python [closed]


One easy way to do this is with variables. Create 4 variables, one for hundreds, one for tens, one for ones, and also a variable to store the actual number to be counted on. Set the values to 1 for the counters and the value to 111 for the number variable.
Add 1 to the ones counter until it gets to 3 adding 1 to the number variable each time.
Then add 1 to the tens counter if its under 4 and add 10 the the number variable, then reset ones counter, else add one to hundreds counter and add 100 the the number variable, and reset the ones counter to 1 and tens counter to 1. Count through again until you get to three and ..etc etc.

3

solved challenging question on alteration of how numbers count on c++ or python [closed]