Hello Friends
I am having a problem in finding the solution for this Question. Please help me.
I am having a number say "n". In this case let us consider n=3.
What i have to do is find first "n" multiples of "n".
Store the answers somewhere.
Find again the first "n" multiples of the answers.
Store the another answers(N1) generated.
Find again the first "n" multiples of the answers(N1) .
Store the answers generated.
Repeat the process "n" times.
So the tree will be formed like this for "n"=3.
---------------1--------------------------------- 2 ----------------------------------------3
1 ------------2----------3----//-----2----------4--------------6----///----3-----------6--------------9
123-------2 4 6----3 6 9-///-2 4 6------4 8 12---- 6 12 18-//-3 6 9----6 12 18-----9 18 27
The "----" and "////" are just show insted of spaces.
Each variable should be stored in such a way. So that I can locate easily from which nodes it was generated.
I dont want the program but just the logic of how to do that.