summaryrefslogtreecommitdiff
path: root/wk1/lab1
diff options
context:
space:
mode:
Diffstat (limited to 'wk1/lab1')
-rw-r--r--wk1/lab1/population.c8
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);