X119: squareUp

Given n >= 0, create an array of length n * n with the following pattern, shown here for n = 3 : {0, 0, 1,    0, 2, 1,    3, 2, 1} (spaces added to show the 3 groups).

Your Answer:

Reset

Practice a different Java exercise

Feedback

Your feedback will appear here when you check your answer.