You could put all of this into one for loop, but you'd have to add some extra controls. Also, since you are doing things in a different order this way, your tables will not be in the same order.
I mean to make a loop just by using "i" and "j" and something like "i*j" to get the above program works without copying and pasting the "same" thing for every loop...for example, I can just change at "i" and "j" how many row and column i want instead of changing every number in every loop(let say 100 loop)...TQ...