diff options
author | Fudgerboy <91767657+Fudgerboy@users.noreply.github.com> | 2023-12-03 06:43:04 +0000 |
---|---|---|
committer | Fudgerboy <91767657+Fudgerboy@users.noreply.github.com> | 2023-12-03 06:43:04 +0000 |
commit | fa12c4a9a89eb1b8e6db1e84dcff7411634352c2 (patch) | |
tree | fdd65ad3317faa6ab8540ede0d734d05b5011b2b /wk1/lab1 | |
parent | 0156446452d03415fd2019e4c070567d1566cee4 (diff) |
Sat, Dec 2, 2023, 10:43 PM -08:00
Diffstat (limited to 'wk1/lab1')
-rw-r--r-- | wk1/lab1/population.c | 8 |
1 files changed, 4 insertions, 4 deletions
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 <stdio.h> #include <cs50.h> +#include <stdio.h> 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); |