From b1423b2ad3de7b9f05099df4e3d32eda7406cc6a Mon Sep 17 00:00:00 2001 From: David Venturi Date: Tue, 17 Nov 2015 13:34:55 -0500 Subject: [PATCH] Update mario.c Added return 0; --- pset1/mario.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/pset1/mario.c b/pset1/mario.c index 9c89ade..45ec110 100644 --- a/pset1/mario.c +++ b/pset1/mario.c @@ -16,11 +16,11 @@ int main(void) // requests an integer from the user until the height requirement is satisfied do { - printf("Please give me an integer between 1 and 23: "); + printf("Please give me a non-negative integer no greater than 23: "); height = GetInt(); } - while (height < 1 || height > 23); - printf("Thank you for the integer!\nHere is Mario's half-pyramid of height %i:\n", height); + while (height < 0 || height > 23); + printf("Thank you for the valid integer!\nHere is Mario's half-pyramid of height %i:\n", height); // the top row needs two hashes width = height + 1; @@ -34,7 +34,8 @@ int main(void) printf(" "); else printf("#"); - } + } printf("\n"); - } + } + return 0; }