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