Question: Hello, I need help with this code. I have screenshots of the problem and some stuff to help you do it the way it's required.
Hello, I need help with this code. I have screenshots of the problem and some stuff to help you do it the way it's required. I already wrote some of the code but I'm stuck, especially on the idiot-proofing and calculation part. The code is in basic C, not C++ or C#.








You've just opened an Italian restaurant Each meal your restaurant serves can consist of an entree, a dessert, and a drink. Your Italian restaurant serves several entrees (cheese ravioli, beef rigatoni, vegetarian lasagna), several desserts (cheesecake, tiramisu, gelato), and several drinks (coffee, soda, tea) Your restaurant also has a kiddie menu for children, with two additional entrees (spaghetti, maca- roni and cheese), and one additional drink (lemonade) Each entree has two size options: small and large. (Desserts and drinks come in one size only.) Each entree price depends on the size choice: for each, the small size is cheaper than the large size. Children can order either from the regular menu or from the kiddie menu, but they can only order the small size of the adult entrees, or one of the kiddie entrees (which only come in one size) Children CANNOT order coffee or tea. Adults CANNOT order the kiddie entrees or the kiddie drinks A customer can order AT MOST one item from each category; for example, they can order a large vegetarian lasagna as their entree, cheesecake as their dessert and coffee as their drink. But, they AREN'T REQUIRED to order one of each category; for example, they can order no entree or dessert at all, just a cup of coffee The prices are Item Price SmallLarge |Item Price Price $7.25 $9.00 Cheesecake $4.25 $8.75 $10.50 Tiramisu S5.50 Cheese Ravioli Beef Rigatoni Vegetarian Lasagna $9.50 $11.25 Gelato Spaghetti Macaroni & Cheese $3.7:5 $3.75 $2.75 $1.50 $2.00 $4.50 Coffee Soda Tea Lemonade $1.75 Your community's sales tax rate is 8.75%. A tip of 18% is automatically added to every bill NOTE: You are welcome to substitute other items, as long as you do so consistently and continue to follow the rules. For example, you could change beef rigatoni to eggplant parmigiana, etc, but the number and categories of items, and the prices, MUST remain the same
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
