summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFudgerboy <91767657+Fudgerboy@users.noreply.github.com>2023-12-03 06:34:37 +0000
committerFudgerboy <91767657+Fudgerboy@users.noreply.github.com>2023-12-03 06:34:37 +0000
commitcb7aaa1462390a0e80eb8b299886361302de7195 (patch)
treeb280f7241ad1f680b3c154bdcf7cb780a8740b14
parent8a613714f895663ca9513fad7cbdcdadac26b9f6 (diff)
Sat, Dec 2, 2023, 10:34 PM -08:00
-rw-r--r--wk1/lab1/population.c14
1 files 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)
{