Answered step by step
Verified Expert Solution
Question
1 Approved Answer
In addition to the first question, you are expected to create one more structure for foods. Then, structures must be filled by user inputs. After
In addition to the first question, you are expected to create one more structure for foods. Then, structures must be filled by user inputs. After filling your structures, you will let user to buy any food from menu. Then, print each customer and their menu including their total price. Hint: To achieve these steps, you must use pointer in your customer structure to link it to food structure. Write the code with C
Enter information of customers: Enter customer id: 101 Enter first name: ahan Enter last name: zaydn Enter age: 27 Enter customer id: 102 Enter first name: erkan Enter last name: yldz Enter age: 28 Enter food id: 1 Enter food name: iskender Enter food price: 25 Enter food id: 2 Enter food name: beyti Enter food price: 27 Displaying menu: food id: 1 food name: iskender food price: 25 food id: 2 food name: beyti food price: 27 Customers: customer id: 101 customer name: ahan customer id: 102 customer name: erkan choose an operation : buy Choose a food from the menu: 1 Choose a customer from the given list with customer id: 101 choose an operation : buy Choose a food from the menu: 2 Choose a customer from the given list with customer id: 102 choose an operation : buy Choose a food from the menu: 1 Choose a customer from the given list with customer id: 102 choose an operation : exit customer name : ahan food id: 1 food name: iskender bill: 25 customer name : erkan food id: 1 food name: iskender food id: 2 food name: beyti bill: 52Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started