Question: Use #include # include Write a single program that reads up to 21 floating-point numbers entered at the keyboard into a onedimensional array and has

Use #include

# include

Write a single program that reads up to 21 floating-point numbers entered at the keyboard into a onedimensional array and has user defined functions to provide the count of both positive numbers and the negative numbers and the total of the negative and the positive numbers. The program will stop reading sets of values when the sentinel 0 is entered. The main program will print the heading, the main program will ask the user how many numbers they want to process in the array and the main will provide the option to end the program. The main program will ask the user for the values that will be placed in the array and it will call many user defined functions.

The 1st user defined function will count the positive numbers in the array and return that count to the main.

The 2nd user defined function will total the positive numbers in the array and return that total to the main.

The 3rd user defined function will count the negative numbers in the array and return that count to the main.

The 4th user defined function will total the negative numbers in the array and return that total to the main. The 5th user defined function will print the positive count, the positive total, the negative count and the negative total to the screen.

(use the following filename system: students last name_funarray13_first initial.c)

(must be included in the program as sample output):

Sample Output ---- Scenario1

Name and Date:

Course and Class #:

Problem: numbers

Statement: Arrays

The array takes values from the user and counts the quantity of positive and negative values and totals the positive and negative values.

How many numbers will you enter

(positives & negatives) or 0

0

Press any key to continue . . .

Sample Output: Scenario2

Name and Date:

Course and Class #:

Problem: numbers

Statement: Arrays

The array takes values from the user and counts the quantity of positive and negative values and totals the positive and negative values.

How many numbers will you enter

(positives & negatives) or 0

8

Enter a value into array position 0: 5.0

Enter a value into array position 1: -10.0

Enter a value into array position 2: 8.0

Enter a value into array position 3: -4.0

Enter a value into array position 4: 90.0

Enter a value into array position 5: -45.0

Enter a value into array position 6: 25.0

Enter a value into array position 7: -1.1

The sum of the 4 positive values is 128.00

The sum of the 4 negative values is -60.10

How many numbers will you enter

(positives & negatives) or 0

0

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!