From 87a7477a7ab8bfecad801455cd18ef9c818dc3f2 Mon Sep 17 00:00:00 2001 From: hazer888 <32114255+hazer888@users.noreply.github.com> Date: Wed, 11 Oct 2017 16:59:30 -0400 Subject: [PATCH] Update Exercise_05_18_B.java --- Exercise_05/Exercise_05_18/Exercise_05_18_B.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Exercise_05/Exercise_05_18/Exercise_05_18_B.java b/Exercise_05/Exercise_05_18/Exercise_05_18_B.java index 6a7954c9..4a3c14f3 100755 --- a/Exercise_05/Exercise_05_18/Exercise_05_18_B.java +++ b/Exercise_05/Exercise_05_18/Exercise_05_18_B.java @@ -6,11 +6,11 @@ public class Exercise_05_18_B { public static void main(String[] args) { // Display pattern B System.out.println("Pattern B"); - for (int r = 6; r >= 1; r--) { - for (int c = 1; c <= r; c++) { - System.out.print(c + " "); + for (int c = 6; c >= 1; c--) { + for (int r = 1; r <= c; r++) { + System.out.print(r); } System.out.println(); } } -} \ No newline at end of file +}