Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Submit the source code (your filename.c file) electronically and on paper as a hard copy. Include copy of the results as comment lines in the

image text in transcribedimage text in transcribed

Submit the source code (your filename.c file) electronically and on paper as a hard copy. Include copy of the results as comment lines in the completed program. All source code must be in a filename.c format. No other formats will be accepted. Phase I General Preprocessing items: Use mnemonic variables of 3 characters or more. Use void main (void) or void main in your program and leave off the return 0. Use double as the choice for all floating point values. Add heading items using as printf statement. Watch for instructions that specify a symbolic constant and assign that symbolic constant in all capital letters and using the #define. Thank you. The "xxxx" or the "(highlighted item)" in a sample output will show examples of locations that the computer program will transfer values. Phase II-General procedures: A line of information in the program should be no longer than 80 characters. All user-defined function problems should include the student's last name as part of their function name. All user- defined function written for the class must have a prototype. The user-defined functions will be located in the program after the main program. Only use local variables in the programs, no global variables. Phase III-Array names will include the student's lastname as part of the array name. Example Smith countarrayl35l; Pointers should only be used when specified as a mandatory part of the problem. Problem #1 Write a single program that reads up to 21 floating-point numbers entered at the keyboard into a one- dimensional 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

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_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

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

Get Started

Recommended Textbook for

Practical Database Programming With Visual Basic.NET

Authors: Ying Bai

1st Edition

0521712351, 978-0521712354

More Books

Students also viewed these Databases questions

Question

Listen! Listen! Listen!

Answered: 1 week ago