0
Write a code to find number of 1's between 1 to 100
3 Answers
+ 3
I'm not sure I get the question, but here's a lame way to it :)
https://code.sololearn.com/cYO2dM848ukw/?ref=app
+ 2
1 + 18 + 1 (18 : 10~19 -> 10 + 21,31,41,51,61,71,81,91
It is simple mathematics in a constant range, no need for a program ^^
If it where in an unknown range, then it would become interesting