Question: Task 5: Write a main function to perform the following tasks: (29 marks) a) You need to use an appropriate LOOP to perform the process

 Task 5: Write a main function to perform the following tasks:

Task 5: Write a main function to perform the following tasks: (29 marks) a) You need to use an appropriate LOOP to perform the process in this function. The loop will be repeated when the user press ENTER. b) You are NOT ALLOWED to use arrays except an array of characters. c) The function should ask the user to enter a state name. 2 d) The function may need to call the functions that are defined in Task 2 Task 3. and Task 4. e) The function should calculate the number of active cases for Covid 19 using the following formula: Number of active cases = Total cases + New cases - Total Death - Total Recovered f) The function should determine the state with the highest number of active cases and calculate the number of states, and the total number of active cases for all states. Note: You are NOT ALLOWED to use any predefined function(s) to determine the highest number of active cases. g) The program should produce the output as in the sample execution given below. Note: The values in bold are input by the user. Task 6: List all function prototypes. (4 marks) Task 5: Write a main function to perform the following tasks: (29 marks) a) You need to use an appropriate LOOP to perform the process in this function. The loop will be repeated when the user press ENTER. b) You are NOT ALLOWED to use arrays except an array of characters. c) The function should ask the user to enter a state name. 2 d) The function may need to call the functions that are defined in Task 2 Task 3. and Task 4. e) The function should calculate the number of active cases for Covid 19 using the following formula: Number of active cases = Total cases + New cases - Total Death - Total Recovered f) The function should determine the state with the highest number of active cases and calculate the number of states, and the total number of active cases for all states. Note: You are NOT ALLOWED to use any predefined function(s) to determine the highest number of active cases. g) The program should produce the output as in the sample execution given below. Note: The values in bold are input by the user. Task 6: List all function prototypes. (4 marks)

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!