From 5003497305cb063c4ea61fd270b10cf2bddb589e Mon Sep 17 00:00:00 2001 From: till-t <78442426+till-t@users.noreply.github.com> Date: Tue, 26 Oct 2021 22:42:54 -0700 Subject: Update width and height inside of loops. --- CST116F2021-Lab4/Lab4_Taormina | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/CST116F2021-Lab4/Lab4_Taormina b/CST116F2021-Lab4/Lab4_Taormina index 47a5f0c..75b0f29 100644 --- a/CST116F2021-Lab4/Lab4_Taormina +++ b/CST116F2021-Lab4/Lab4_Taormina @@ -377,17 +377,17 @@ void draw (int w, int h) { int i; cout << char(218); - for (int i = 0; i <= (w - 2); i++) + for (int i = 0; i <= (w); i++) cout << char(196); cout << char(191) << endl; - for (int i = 0; i <= (h - 1); i++) { + for (int i = 0; i <= (h); i++) { cout << char(179); - for (int i = 0; i <= (w - 2); i++) + for (int i = 0; i <= (w); i++) cout << " "; cout << char(179) << endl; } cout << char(192); - for (int i = 0; i <= (w - 2); i++) + for (int i = 0; i <= (w); i++) cout << char(196); cout << char(217); } -- cgit v1.2.3