From 964708272785abe5a11033eeec5553c5a9ce6efd Mon Sep 17 00:00:00 2001 From: "Dr. Martin Goik" <goik@hdm-stuttgart.de> Date: Tue, 4 May 2021 18:16:32 +0200 Subject: [PATCH] Ex. 80 second loop: SIZE --> row --- Doc/Sd1/statements.xml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Doc/Sd1/statements.xml b/Doc/Sd1/statements.xml index 7ed6300bc..3c3cf4408 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. -- GitLab