From f97d30725d7efc18864e935a933ae166619376e9 Mon Sep 17 00:00:00 2001 From: Fudgerboy <91767657+Fudgerboy@users.noreply.github.com> Date: Sun, 3 Dec 2023 10:15:12 +0000 Subject: Sun, Dec 3, 2023, 2:15 AM -08:00 --- wk1/pset1/mario-more/mario.c | 33 +++++++++++++++++++++++---------- 1 file changed, 23 insertions(+), 10 deletions(-) (limited to 'wk1/pset1/mario-more/mario.c') diff --git a/wk1/pset1/mario-more/mario.c b/wk1/pset1/mario-more/mario.c index b4fa540..60c0937 100644 --- a/wk1/pset1/mario-more/mario.c +++ b/wk1/pset1/mario-more/mario.c @@ -27,23 +27,36 @@ void print_grid(size) { for (int i = 0; i < size; i++) { + for (int x = 0; x < 2; x++) + { for (int j = 0; j < size; j++) { - if ((size - (j + i)) > 1) + if (x == 0) { - printf(" "); - } else { - printf("#"); + if ((size - (j + i)) > 1) + { + printf(" "); + } + else + { + printf("#"); + } } - - /*if ((size - (j + i)) < 1) + else { - printf(" "); - } else { - printf("#"); - }*/ + if ((size - (j + i)) > 1) + { + printf(" "); + } + else + { + printf("#"); + } + } } printf(" "); + } + printf("\n"); } } -- cgit v1.2.3