From cb7aaa1462390a0e80eb8b299886361302de7195 Mon Sep 17 00:00:00 2001 From: Fudgerboy <91767657+Fudgerboy@users.noreply.github.com> Date: Sun, 3 Dec 2023 06:34:37 +0000 Subject: Sat, Dec 2, 2023, 10:34 PM -08:00 --- wk1/lab1/population.c | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/wk1/lab1/population.c b/wk1/lab1/population.c index 3d622a9..479ba63 100644 --- a/wk1/lab1/population.c +++ b/wk1/lab1/population.c @@ -3,8 +3,18 @@ int main(void) { - int n = get_int("Start size: "); - int end = get_int("End size: "); + int n; + do + { + n = get_int("Start size: "); + } + while (n < 9); + int end; + do + { + end = get_int("End size: "); + } + while (end <= n); int year = 0; while (n < end) { -- cgit v1.2.3