Question: Array of structures Create a function called CreateArrayor Structure to create an array of structs called pizzasin Store with 3 fields: name, a string scalar

 Array of structures Create a function called CreateArrayor Structure to create

Array of structures Create a function called CreateArrayor Structure to create an array of structs called pizzasin Store with 3 fields: name, a string scalar with the name of the pizza, ingredients, a string scalar with the ingredients, and calories, a numeric variable with the total calories. The first itenm in pizzasin Store is associated with the "Barbecue" pizza, then "Carbonara pizza, and finally "Ham and Cheese" pizza In a "Barbecue" pizza, the ingredients are "Beet, chicken, bacon, barbecue sauce" and the calories equal an integer, which is an input parameter of the function CreateArrayOf Structure called numcalofBBQ In a "Carbonara" pizza, the ingredients are "Mushrooms, onion, creamy sauce" and the calories equal 5 calories less that the "Barbecue" pizza In a "Ham and Cheese" pizza, the ingredients are "Ham, cheese, bacon and the calories equal the "Barbecue" pizza Ex: > numberCalofBBQ 30; pizzas!nstore CreateArrayofstructure(numberCalofBBQ) pizzas!nstore 1x3 struct array with fields: name ingredients calories >> pizzasInstore.name ans - "Barbecue" "Carbonara" "Ham and Cheese" ans ans >> pizzasInStore.ingredients ans Beef, chicken, bacon, barbecue sauce" Mushrooms, onion, creamy sauce "Ham, cheese, bacon" ans ans >> pizzasInStore.calories ans - 30 ans 25 ans 30 Array of structures Create a function called CreateArrayor Structure to create an array of structs called pizzasin Store with 3 fields: name, a string scalar with the name of the pizza, ingredients, a string scalar with the ingredients, and calories, a numeric variable with the total calories. The first itenm in pizzasin Store is associated with the "Barbecue" pizza, then "Carbonara pizza, and finally "Ham and Cheese" pizza In a "Barbecue" pizza, the ingredients are "Beet, chicken, bacon, barbecue sauce" and the calories equal an integer, which is an input parameter of the function CreateArrayOf Structure called numcalofBBQ In a "Carbonara" pizza, the ingredients are "Mushrooms, onion, creamy sauce" and the calories equal 5 calories less that the "Barbecue" pizza In a "Ham and Cheese" pizza, the ingredients are "Ham, cheese, bacon and the calories equal the "Barbecue" pizza Ex: > numberCalofBBQ 30; pizzas!nstore CreateArrayofstructure(numberCalofBBQ) pizzas!nstore 1x3 struct array with fields: name ingredients calories >> pizzasInstore.name ans - "Barbecue" "Carbonara" "Ham and Cheese" ans ans >> pizzasInStore.ingredients ans Beef, chicken, bacon, barbecue sauce" Mushrooms, onion, creamy sauce "Ham, cheese, bacon" ans ans >> pizzasInStore.calories ans - 30 ans 25 ans 30

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!