Question: Need help with C here's the txt file Design a modular program that reads pizza names and prices from a file into an array of
Design a modular program that reads pizza names and prices from a file into an array of structures Allow for 20 types Repeatedly alow the user to choose from the following options: display ail pizza names and prices, order pu0 type by name, check out, or eit Perform the appropriate ceuiig described below Functions Desig, a function that will display the pizza names and prices from the array of structures and count. The function takes the array of structures and count as parameters. (Prefer pointer notation) Design a function that searches for the requested pizza name and returns the index where found for -1 if not found). The function takes the requested pizza name, array of structures and count as parameters and returns the index or -1 if not found The program will: 1. 2. a Display a welcome message (include with your name as part of the company name) Read the pizza names and prices from the file into an array of structures Repeatedly (until the user chooses to exit) allow the user to select from the following options (Djisplay call the function to display the pizza names and prices from the array of structures a. b. (Ojrder: allow the user to enter the requested pizza names and call the function to find the index. If the pizza name is valid, add the price to the order total c (Cjheckout display the order total and reset the order total to O d. (E)xit Use the following steps to develop your program Include the preprocessor directives that will include the appropriate header files 2. Write the preprocessor directives that will define the maximum number of pizza types 3. Declare the structure or type definition. 4 Write the function prototypes s Write the main program 6 Write the functions Include comments describing what the code and functions do 8. Generate test data and expected results for D, O Cowboy, O Meat, C, o Cowbell, O Veggie, C, E 9. Produce the output according to the test data ubmit the solution: Paste a copy of the test data and expected results in a comment at the end of the source code Paste a copy of the sample runs of your program in a comment at the end of the source Print a copy of your source code (spell check off, Black & White; paper size Letter)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
