- Home /
Question by
Tanvir_008 · Oct 17, 2016 at 08:42 AM ·
debug.logfor looppattern
I am trying to print pyramid pattern in debug.log section...
I want to build number pyramid pattern in debug.Log but I am facing some problem. Here is my code
private string[] myStr = new string[10];
void Upadte()
for (int x = 0; x < 3; x++) { for (int y = 0; y < x; y++) { myStr [x] += y.ToString (); Debug.Log (myStr[x]); } Debug.Log ('\n'); }
But the result has some problem like this
0
0 01
0 01 012
0 01 012 0123
But I want just 0 01 012 0123
Can anybody help ???
Comment
Your answer
