XP Math - Forums - View Single Post - Intermediate How Many Ones?
Thread
: Intermediate
How Many Ones?
View Single Post
04-20-2009
#
4
Sugengz
Join Date: Mar 2009
Posts: 4
Using Mathematica the answer is 600,000...
Here is the code:
For[x = 1; y = 0, x <= 999999, x++; y = y + StringCount[ToString[x], "1"]]; Print[y]
Sugengz
View Public Profile
Send a private message to Sugengz
Find More Posts by Sugengz