diff options
author | Fudgerboy <91767657+Fudgerboy@users.noreply.github.com> | 2023-12-03 06:12:29 +0000 |
---|---|---|
committer | Fudgerboy <91767657+Fudgerboy@users.noreply.github.com> | 2023-12-03 06:12:29 +0000 |
commit | 8ed55ea2d01c6cc423b882135e8c1315c2d9d5c6 (patch) | |
tree | 880fb8fa61c474d6ffc1a300fb2fa0bc86911001 /wk1/lab1 | |
parent | 2edb0b5c21b754263477f5db336e49faf2fe40bd (diff) |
Sat, Dec 2, 2023, 10:12 PM -08:00
Diffstat (limited to 'wk1/lab1')
-rw-r--r-- | wk1/lab1/population.c | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/wk1/lab1/population.c b/wk1/lab1/population.c index 0e9c32d..3925e82 100644 --- a/wk1/lab1/population.c +++ b/wk1/lab1/population.c @@ -6,12 +6,11 @@ int main(void) int n = get_int("Start size: "); int end = get_int("End size: "); int year = 0; - while (n < end) - { - n += n/3; - n -= n/4; - year++; - printf("%i", year); - } + //while (n <= end) + //{ + n = n + (n/3); + n = n - (n/4); + year = year + 1; + //} printf("Years: %i", year); } |