Question: I have also attached the original code that was used. I need help with performing the counts as user-defined functions. Please provide the code in

I have also attached the original code that was used. I needhelp with performing the counts as user-defined functions. Please provide the codeI have also attached the original code that was used. I need help with performing the counts as user-defined functions. Please provide the code in basic C, not C++ or C#

Rewrite the program from Homework #10, to count the number of negative values, the number of positive values and the number of zeros in a floating point array. Instead of performing these counts inside the main program, each count should be calculated by a USER-DEFINED FUNCTION. (NOTE: DONT delete your source file or script file from Homework/Quiz #101) Specificially, the program should: . greet the user, * prompt for and input the length of the array; . idiotproof the array length; e dynamically allocate the array; check that the allocation was successful prompt for and input the values in the array count the number of positive values by calling a USER-DEFINED FUNCTION: output the numbers of negative, positive and zero values in the array; . count the number of negative values by calling a USER-DEF?NED FUNCTION: count the number of zeros by calling a USER-DEFINED FUNCTION; deallocate the array. ADai NOTE: You MUST calculate each of the three counts in ITS OWN user-defined function; you are ABSOLUTELY FORBIDDEN to calculate more than one of them in the same user-defined function

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!