for (int i = 0; i < 100000000; i++)
cout << i << endl;
Is that what you're looking for? Another way you could do it is to nest 8 loops inside of each other.
for (int i1 = 0; i1 < 10; i1++) {
cout << i1;
for (int i2 = 0; i2 < 10; i2++) {
cout << i2;
for (int i3 = 0; i3 < 10; i3++) {
etc...
}
}
}
And when you get to i8, print out a new line.