Question: Need C codes and the flow chart 1. Design (using a flowchart and pseuodocode with C syntax) and implement a modular program using arrays that
Need C codes and the flow chart
1. Design (using a flowchart and pseuodocode with C syntax) and implement a modular program using arrays that will allow the user to enter the team name, wins, losses, and ties for a number of teams. Allow for 10 teams. The program will determine with team(s) with the best record. Reuse the functions from the previous projects. Write two new functions to determine and return the index of the highest percentage and the index of the lowest percentage. In the main function call a function to display a welcome message (i.e. Welcome to YourName's Football Stats) identifying the program. Then prompt the user to repeatedly enter the team name, wins, losses, and ties into arrays. Perform data validation on the input to ensure the values are legal. When all iterations are complete, call a function to calculate and return the percentage wins. Display the team name, wins, losses, ties, and percentage wins. Call a function to determine the team(s) with the highest percentage wins and display, with the lowest percentage wins. At the end of the program, call a function to display a message that the results were provided by your name.
Include a comment containing the project description, your name, course, and date at the beginning of the source code. Include comments to document each function. (Describe the function, the parameters, and the return value.) Include comments to document the code.
Provide 3 sets of test data* (sample input and expected results). Two sets of sample input appear below. Run the program on the sample input and capture the output to verify that the program runs correctly.
Functions:
Display welcome message - accepts no parameters and returns no value
Calculate percentage - accepts two parameters and returns the quotient
Display program credits/results by - accepts no parameters and returns no value
Best percentage - accepts two parameters and returns the index of the best percentage
Worst percentage - accepts two parameters and returns the index of the worst percentage
2. To submit your assignment:
Add a comment to the end of your source code and include your test data (sample input and expected results). (Use /* and */ to enclose the test data.)
Copy and paste the sample runs (output) into another comment at the end of your source code. (Use /* and */ to enclose the sample runs.)
Copy and paste the flowchart and pseudo-code for your program into a Word document. (In Word, use Ctrl-A to select entire text, then click "Remove space after paragraph" to tighten the line spacing.)
Print the source code and the Word document. (If using Code::Blocks, be sure to turn off spell check, choose letter sized paper, rather than A-4, so you don't lose lines between pages. Change the print option to print in Black & White if you are not printing to a color printer.)
Staple the documents.
Upload an electronic copy of the source code, flowchart, and documentation files for the program to Blackboard under the Project link. When complete, Submit the assignment.
Turn in the printed documents for scoring on or before the due date.
Submission: To submit your files, choose the link titled, Project 4, above. Use the "Browse My Computer" button in the Attach File area to attach your files. Be sure to complete your submission by clicking the "Submit" button at the bottom of the screen.
Grading: You must submit all deliverable items to successfully complete this assignment.
char teams[NUM_TEAMS][LEN_TEAM + 1];
AFC South: 10/16/2017
Team
Wins
Losses
Ties
Colts
2
3
0
Jaguars
3
3
0
Texans
3
3
0
Titans
2
3
0
AFC North: 10/16/2017
Team
Wins
Losses
Ties
Bengals
2
3
0
Browns
0
6
0
Ravens
3
3
0
Steelers
4
2
0
Note: This project demonstrates using input, calculations, decisions, loops, arrays, functions, and output in C.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
