Do Programming Exercise 7 but use new to allocate a structure instead of declaring a structure variable.
Question:
Do Programming Exercise 7 but use new to allocate a structure instead of declaring a structure variable. Also have the program request the pizza diameter before it requests the pizza company name.
Data From Exercise 7
- William Wingate runs a pizza-analysis service. For each pizza, he needs to record the following information:
The name of the pizza company, which can consist of more than one word
The diameter of the pizza
The weight of the pizza
Devise a structure that can hold this information and write a program that uses a structure variable of that type. The program should ask the user to enter each of the preceding items of information, and then the program should display that information. Use cin (or its methods) and cout.
Fantastic news! We've Found the answer you've been seeking!
Step by Step Answer:
Related Book For
Question Posted: