Well here is what I suggest: This will work only if the triangle you are printing is small. Well it will WORK with anyway, but only look like triangle if it is small.
what we want is something that looks like:
CODE
1
1 1
1 2 1
1 3 3 1
To do this neatly we need to set element we will print to a set number of char. For the above I chose 3.
so you need to make 1 look like .1. (where the "." is a space)
each element gets seperated by a space. So the next line is ".1...1." then ".1...2...2...1." etc.
then choose an offset say 10, then add that many spaces to the first line, and then subtract that by 1 for each additional line.
I admit that this is not pretty but it would work.
Hints. The Integer class has a .toString() function which will convert your ints to strings.