diff options
author | Fudgerboy <91767657+Fudgerboy@users.noreply.github.com> | 2023-12-04 03:21:17 +0000 |
---|---|---|
committer | Fudgerboy <91767657+Fudgerboy@users.noreply.github.com> | 2023-12-04 03:21:17 +0000 |
commit | 3b914f08593dcece1c51aff46312357e546ccb51 (patch) | |
tree | 3f38401fd268085cf0ce7de3520ca06e9d098315 /wk1/pset1 | |
parent | a7c36b5e6dadc0ed9429f570d96cd1ac35212c43 (diff) |
Sun, Dec 3, 2023, 7:21 PM -08:00
Diffstat (limited to 'wk1/pset1')
-rw-r--r-- | wk1/pset1/mario-more/mario.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/wk1/pset1/mario-more/mario.c b/wk1/pset1/mario-more/mario.c index 810048a..ed1de18 100644 --- a/wk1/pset1/mario-more/mario.c +++ b/wk1/pset1/mario-more/mario.c @@ -27,7 +27,7 @@ void print_grid(size) { for (int i = 0; i < size; i++) { - for (int x = 0; x < 2; x++) + for (int x = 0; x < 1; x++) { for (int j = 0; j < size; j++) { @@ -39,8 +39,11 @@ void print_grid(size) { printf("#"); } - } for (int j = size; j > 0; j--) { - if ((size - (j + i)) > 1) + } + printf(" "); + for (int j = size; j > 0; j--) + { + if ((size - (j + i + i)) > 1) { printf("#"); } @@ -49,7 +52,6 @@ void print_grid(size) printf("!"); } } - printf(" "); } printf("\n"); } |