Quote:Original post by Nanook
but seriously.. im a newb.. why? :D
Because it's equivalent to printing out the number, putting the print out on a wooden table, taking a picture, scanning the picture and then using an image recognition program to find the number of digits. :-)
Seriously, though, if there is a simple formula to calculate the number of digits, there is no need to get wooden tables involved. In this case, not only the string-based solution is much slower, the professor probably wouldn't accept it because by using strings you ignore properties of numbers. Knowing these properties will help you in programming.
deathkrushPS3/Xbox360 Graphics Programmer, Mass Media.Completed Projects: Stuntman Ignition (PS3), Saints Row 2 (PS3), Darksiders(PS3, 360)