We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 698e81a commit c4e1b78Copy full SHA for c4e1b78
src/main/java/com/guide/c5/Squares.java
@@ -0,0 +1,26 @@
1
+package com.guide.c5;
2
+
3
+// Initialize a two-dimensional array.
4
+public class Squares {
5
+ public static void main(String[] args) {
6
+ int[][] sqrs = {
7
+ { 1, 1 },
8
+ { 2, 4 },
9
+ { 3, 9 },
10
+ { 4, 16 },
11
+ { 5, 25 },
12
+ { 6, 36 },
13
+ { 7, 49 },
14
+ { 8, 64 },
15
+ { 9, 81 },
16
+ { 10, 100 }
17
+ };
18
+ int i, j;
19
20
+ for (i = 0; i < 10; i++) {
21
+ for (j = 0; j < 2; j++)
22
+ System.out.print(sqrs[i][j] + " ");
23
+ System.out.println();
24
+ }
25
26
+}
0 commit comments