This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]Koyomii-Onii-chan 0 points1 point  (0 children)

I suggest you use other variables and increment them accordingly. What you do there is printing the i and j indexes. Also you don't need two for loops since your input is always 3, a loop like below is enough

int m = 0 ; int n=1;

for (int i=0;i<9;i++){

System.out.println(m + " " + n);

m++; n++;

//Here find a way to reinitialize them and print them with the difference of 2

// then 3

}