subject

Write a program that counts 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.

specificially, the program should:

• greet the user,

• prompt for and input the length of the array;

• idiotproof the array length;

• dynamically allocate the array;

• check that the allocation was successful;

• prompt for and input the values in the array

• count the number of negative values by calling a user-defined function;

• count the number of positive values by calling a user-defined function;

• count the number of zeros by calling a user-defined function;

• output the numbers of negative, positive and zero values in the array;

• deallocate the array.

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.

ansver
Answers: 3

Another question on Computers and Technology

question
Computers and Technology, 21.06.2019 18:30
Given the following code: if (n == 2) { k -= 2; } else if (n == 3) { k -= 3; } can be rewritten as: if (< condition > ) { < assignment statement > ; } assume that evaluating < condition > does not change the values stored in n and k. which of the following could be used as < assignment statement > ? k -= n; k -= 1; k -= 2; k += n; k = n - k;
Answers: 2
question
Computers and Technology, 22.06.2019 10:00
What is a society that has moved to the internet rather than relying on physical media called
Answers: 2
question
Computers and Technology, 22.06.2019 22:30
I'll mark brainliest if answered right! with which feature or menu option of a word processing program can you make an image like this? you can get this image using the option of a word processing program.
Answers: 1
question
Computers and Technology, 23.06.2019 14:00
Select the correct answer. a company is currently focusing on creating specific management goals for itself. which level of maturity is the company demonstrating under the sse_ccm framework? a. performed informally b. planned and tracked c. quantitatively controlled d. well-defined e. continuously improving
Answers: 2
You know the right answer?
Write a program that counts the number of negative values, the number of positive values and the num...
Questions
question
Mathematics, 07.04.2021 08:30
question
Mathematics, 07.04.2021 08:30
question
Mathematics, 07.04.2021 08:30
question
Biology, 07.04.2021 08:30
Questions on the website: 13722363