Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

image text in transcribed

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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Students also viewed these Databases questions