I need to convert a code having arbitary number of nested loops using tail recursion. can any one provide me its solution in c/c++.
For example:
for ( int a = 0; a < 3; a++ )
{
for ( int b = 0; b < 3; b++ )
{
for ( int c = 0; c < 3; c++ )
{
cout << crap[a] <<" "<<crap[b]<<" "<<crap[c];
cout <<"\n";
}
}
}