diff --git a/Doc/Sd1/statements.xml b/Doc/Sd1/statements.xml index 7ed6300bc55d300522e0770ff49156b1e5ae56d3..3c3cf4408f8f1398e50a7d4a13b04bd623e415da 100644 --- a/Doc/Sd1/statements.xml +++ b/Doc/Sd1/statements.xml @@ -4240,9 +4240,9 @@ for (int row = 1; row <= SIZE; row++) { // Printing rows. </listitem> <listitem> - <para>Having a table tail now rather than a head we defer - our former solution's second block to the end thereby - reversing its internal order of print statements. The + <para>Having a table tail now rather than a head we also + have to defer our former solution's second block to the + end thereby reversing the order of print statements. The following code also includes some minor newline character fiddling:</para> @@ -4255,7 +4255,7 @@ final int SIZE = 10; // Table size is subject to chan // for (int row = 1; row <= SIZE; row++) { // Printing rows. System.out.format("%3d| ", row); // Printing new line by \n and beginning of row e.g. " 5|" - for (int col = 1; col <= SIZE; col++) { + for (int col = 1; col <= row; col++) { System.out.format("%3d ", row * col); // Printing row times column product values. } System.out.println(); // New line after printing row.