Originally Posted by
KAUFMANN
So, I've put together a small code to compute the number of steps necessary to come to 1, given an integer. It works fine but I can't use int variables to really large numbers like 1 000 000 000 000 and larger.
If only there were some way to make big numbers from small numbers.
Code:
for( onetrillion = 0; onetrillion < 1000; onetrillion++ )
for( onebillion = 0; onebillion< 1000; onebillion++ )
for( onemillion = 0; onemillion < 1000; onemillion++ )
for( onethousand = 0; onethousand < 1000; onethousand++ )
{
if( onetrillion ) printf( "%d ", onetrillion );
if( onebillion ) printf( "%d ", onebillion );
if( onemillion ) printf( "%d ", onemillion );
printf( "%d\n", onethousand );
}
Quzah.