Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public static int[][] task33(int n) {
- int[][] ans = new int[n][n];
- for (int i = 0; i < n; ++i) {
- for (int j = 0; j < n; ++j) {
- if (i + j <= n - 1) {
- ans[i][j] = i + 1;
- } else {
- ans[i][j] = 0;
- }
- }
- }
- return ans;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement