I'm pretty sure there's no way to do this, but I was wondering, so here goes...
Say I get several int values from the user, and I know for a fact that the 1st value is the largest. Any way I can use the length of the first int value as the padding when printing the rest of the numbers?
Browsing the forum I found that you can determine the length of an int (n) like this:
l = (int) log10(n) + 1;
Using padding of 5 a print would look like:
printf("%5d", n);
So what I want to know is whether or not there's a way to use l instead of 5...
Thank you!