jIs there a way to create a recursive function of the following code?
for(int i=0; i<1000000; i++){
for(int j=0; j<1000000; j++){
for(int k=0; k<1000000; k++){
//Do something using i,j and k
}
}
}
I need it to combine every possible sequence of numbers. eg: (0,0,0) (0,0,1) (0,1,0)
It took about 10 hours to pass through this loops, so i have to simplify it and i think a recursive function could do it.
Thanks