Quantcast XP Math - Forums - View Single Post - Intermediate How Many Ones?
Thread: Intermediate How Many Ones?
View Single Post
Old 09-03-2010   #10
court4298
 
court4298's Avatar
 
Join Date: Sep 2010
Posts: 3
Default

Quote:
Originally Posted by Sugengz View Post
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]
thanks i needed help
court4298 is offline