Question: What is wrong with the following code fragment? ( See the tip back in 8 . In that vein, it has NOTHING to do with

What is wrong with the following code fragment? (See the tip back in 8. In that vein, it has NOTHING to do with the comment. The comment merely tells what else would have gone on between the variable declarations and the assignment statement.)
double growth_rate;
long start_popul, end_popul;
// fill in start and end _popul with data
//(...probably using a cin)
growth_rate = end_popul / start_popul;
In addition to finding and explaining the error, please tell me the name of the method used to fix this situation and show how it would be applied here.

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 Programming Questions!