summaryrefslogtreecommitdiff
path: root/wk1/pset1
diff options
context:
space:
mode:
authorFudgerboy <91767657+Fudgerboy@users.noreply.github.com>2023-12-04 03:12:32 +0000
committerFudgerboy <91767657+Fudgerboy@users.noreply.github.com>2023-12-04 03:12:32 +0000
commite4e284998484f54384c7d14d742786dafa21ef02 (patch)
treeabaadec4ffda1ca4c645bc02a489082d22ca62d5 /wk1/pset1
parent94e37ba39293599f31f1bba79e5d213a4e4e9c7b (diff)
Sun, Dec 3, 2023, 7:12 PM -08:00
Diffstat (limited to 'wk1/pset1')
-rw-r--r--wk1/pset1/mario-more/mario.c29
1 files changed, 12 insertions, 17 deletions
diff --git a/wk1/pset1/mario-more/mario.c b/wk1/pset1/mario-more/mario.c
index 1b1fc83..4bc2183 100644
--- a/wk1/pset1/mario-more/mario.c
+++ b/wk1/pset1/mario-more/mario.c
@@ -31,27 +31,22 @@ void print_grid(size)
{
for (int j = 0; j < size; j++)
{
- if (x == 0)
+ if ((size - (j + i)) > 1)
{
- if ((size - (j + i)) > 1)
- {
- printf(" ");
- }
- else
- {
- printf("#");
- }
+ printf(" ");
}
else
{
- if ((size - (j + i)) > 1) )
- {
- printf("#");
- }
- else
- {
- printf(" ");
- }
+ printf("#");
+ }
+ } for (int j = size; j > 0; j--) {
+ if ((size - (j + i)) > 1)
+ {
+ printf("#");
+ }
+ else
+ {
+ printf(" ");
}
}
printf(" ");