#include <stdio.h> #include <cs50.h> int main(void) { //Prompt for start size int start; do { start = get_int("start: "); } while (start < 9 ); // Prompt for end size int end; do { end = get_int("end: "); } while (end < start);}
//ToDo: Calculate number of years int n = start; int years = 0; while (n < end); { n = n + n/3 - n/4; years++; } //ToDo: Print number of years printf("years: %i\n", years); }
population.c:20:10: error: use of undeclared identifier 'start' int n = start; ^ fatal error: too many errors emitted, stopping now [-ferror-limit=] 2 errors generated. make: *** [: population] Error 1 population/ $