Question: C programming help: My code almost works, I am having trouble with how to make the loop continue for 1 more iteration after it hits

C programming help:
My code almost works, I am having trouble with how to make the loop continue for 1 more iteration after it hits the condition. I set the condition for 100,000 but need it to continue for 1 more time after it hits the coniditon and then print that final result as the last line.
 C programming help: My code almost works, I am having trouble
with how to make the loop continue for 1 more iteration after

Read in two variables, year and population. Each year the population increases by 10%. Write a program that displays the annual population and stops in the year when the town will count over 100,000 people for the first time. Make sure that the population is positive, non-zero. For example: Result p-87650 year-2013 Year Population Input 2013 2014 2015 87650 96415 106056 pu-4 year2013 Population must be larger than LON 10 1 #include 2 #include 3 4. int main () { 5 6 float pop, year; 7 8 scanf("p=%f year=%f", &pop, &year); 9 if (pop

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!