for four different values for n? I assume I have to have an additional for loop but how could I set it up, so that it only runs for these four values i.e. n=10, n=100, n=1000, n=10000?
1 2 3 4 5 6 7
int n =10;
for (int j=0; j<=n; j++)
{...
n=n*10}
Something of the sort, right? But the problem is, that there is no restriction set on this loop so it will run infinitely.