From fa12c4a9a89eb1b8e6db1e84dcff7411634352c2 Mon Sep 17 00:00:00 2001 From: Fudgerboy <91767657+Fudgerboy@users.noreply.github.com> Date: Sun, 3 Dec 2023 06:43:04 +0000 Subject: Sat, Dec 2, 2023, 10:43 PM -08:00 --- wk1/lab1/population.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'wk1/lab1/population.c') diff --git a/wk1/lab1/population.c b/wk1/lab1/population.c index 0ae187a..44a0329 100644 --- a/wk1/lab1/population.c +++ b/wk1/lab1/population.c @@ -1,24 +1,24 @@ -#include #include +#include int main(void) { float n; do { - n = get_int("Start size: "); + n = get_int("Start size: "); } while (n < 9); int end; do { - end = get_int("End size: "); + end = get_int("End size: "); } while (end <= n); int year = 0; while (n < end) { - n += (n/12); + n += (n / 12); year++; } printf("Years: %i\n", year); -- cgit v1.2.3