Possible Duplicate:
Creating a table/Matrix during a For loop
Yet another simple question.
For[i = 1, i < 3, i++,
For[j = 1, j < 3, j++,
Print[{i, j}]
]
]
I want to assign the output to a list, for example like:
tts = {{1, 1}, {1, 2}, {2, 1}, {2, 2}}
All my efforts did not gave me the desired result, but I am sure it is possible. Any suggestions are welcome.
Table. – b.gatessucks Jan 23 at 9:23Forloops: trytts={};For[..., For[..., Print[{i,j}];AppendTo[tts,{i,j}]]]. – kguler Jan 23 at 10:31