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, 22.06.2019 01:30
What kind of motivation is katrina showing? use the drop-down menu to complete the statement. katrina is using motivation because she is personally interested in learning more.
Answers: 2
question
Computers and Technology, 22.06.2019 07:30
By refraining from constructing a building until they are certain that it will not cause harm to the environment, an organization is adhering to the
Answers: 2
question
Computers and Technology, 23.06.2019 04:00
Laire writes a letter to her grandmother, in which she describes an amusement park she visited last week. she adds pictures of that place in her letter. which feature of a word processing program will claire to remove unwanted parts of the pictures?
Answers: 3
question
Computers and Technology, 23.06.2019 18:30
List 3 items that were on kens resume that should have been excluded
Answers: 1
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
History, 16.02.2022 15:30