this is also one of the very small handful of places where a c style string can get a leg up.
char c[] = "654321";
char *cp = c;
..
cout << cp++; //in the loop. This makes it doable in 1 loop instead of nested with minimal effort.
once you know that, you can (ab)use c++ for it:
string c = "654321\0";
char *cp = &c[0];
as above.
gives you this shorty:
1 2 3 4 5 6 7 8
int main ()
{
string c = "654321\0";
char * cp = &c[0];
for(int i = 0; i < c.length(); i++)
cout << cp++ << endl;
return 0;
}