Question: PROGRAM MUST BE WRITTEN IN C c. Implement the prompt_target_enrollment function to prompt the user for the number of students to be enrolled in the

PROGRAM MUST BE WRITTEN IN C

PROGRAM MUST BE WRITTEN IN C c. Implement the prompt_target_enrollment function toprompt the user for the number of students to be enrolled inthe target year. i. The function must have the following parameter: ii.The function must perform the following task: (1) Prompt the user toenter their enrollment target for the year specified by target_year. Input shouldresemble: Enter the enrollment target for the year 2035. Use a loop

c. Implement the prompt_target_enrollment function to prompt the user for the number of students to be enrolled in the target year. i. The function must have the following parameter: ii. The function must perform the following task: (1) Prompt the user to enter their enrollment target for the year specified by target_year. Input should resemble: Enter the enrollment target for the year 2035. Use a loop to validate user input, asking the user to try again if the entered value is non-numeric or is not greater than 0 . Note: You are asking the users to enter the number of students to be enrolled, not the year for the enrollment target. iii. The function must return the valid target enrollment as an int. Implement the calculate_growth_rate function to calculate the annual growth rate that must be obtained to reach the specified target enrollment in the target year. i. The function must have the following parameters: ii. The function must perform the following tasks: (1) Calculate the required annual rate of growth using this formula: \[ \left(\left(\frac{\text { target_enrollment }}{\text { initial_enrollment }} ight)^{1.0 / \text { (target_year-initial_year) }} ight)-1 \] Hint: For a 2035 target enrollment of 40,000, the required annual growth rate should be approximately 2.963% (0.02963). iii. The function must return the calculated required annual growth rate as a double. Use the decimal representation of the growth rate; if the annual growth rate was 2.75%, your function must return 0.0275. Implement the get_growth_rate_description function to return a string describing the required annual growth rate. i. The function must have the following parameter: ii. The function must perform the following task: (1) Return a string literal containing the appropriate description from the table below based on the required annual growth rate. Return the description exactly as listed: iii. The function must return the appropriate description as a const char*. Implement the print_growth_rate function to print the required annual growth rate and associated description. i. The function must have the following parameter: ii. The function must perform the following task: (1) Print the required annual growth rate and description formatted like: Required annual rate of growth, XX0, is description. (a) Format the required annual growth rate as a percentage with 1 decimal place (e.g., 5.7\%). Display the percentage sign (\%). (b) Use the string returned by the get_growth_rate_description function as the description. iii. The function does not return any values. g. Implement the calculate_enrollment_estimate function to estimate the enrollment in a particular year. i. The function must have the following parameters: ii. The function must perform the following task: (1) Calculate the enrollment in estimate_year using this formula: initial_enrollment \( \times\left((1+\text { growth_rate })^{\text {estimate_year-initial_year }} ight) \) (2) Rounds the estimated enrollment to the nearest integer. HINT: For a 2035 target enrollment of 40,000, the estimated enrollment in 2070 should be 111,132 . iii. The function must return the estimated enrollment as an int. h. Implement the print_enrollment_estimates function to print the annual enrollment estimates for a series of years. i. The function must take the following parameters: ii. The function must perform the following task: (1) Using a loop, print the projected enrollment for each year between initial_year and end_year, inclusive, in ascending order. Each year should be formatted like: year enrollment estimate: estimate (a) Use the year the estimate is being calculated for as year. (b) Use the value returned by the calculate_enrollment_estimate function as estimate. iii. The function does not return any values. i. Implement the get_programmer_name function to return the name of the person who wrote the program. i. The function does not have any parameters. ii. The function must perform the following task: (1) Return a string literal containing your name. iii. The function must return your name as a const char*

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!