Answered step by step
Verified Expert Solution
Link Copied!
Question
1 Approved Answer

#include #include #include using namespace std; // structure struct Hat { string size; string color; float price; };// declare the structure variable int main() {

#include #include #include using namespace std; // structure struct Hat { string size; string color; float price; };// declare the structure variable

int main() { Hat hat_1,hat_2,hat_3,hat_4,hat_5; cout<<"Welcome to Hats For U! "; cout<<"Hat 1 "; cout<<"Enter the hat size: "; cin>>hat_1.size; cout<<"Enter the hat color: "; cin>>hat_1.color; cout<<"Enter hat price: "; cin>>hat_1.price;

cout<<"Hat 2 "; cout<<"Enter the hat size: "; cin>>hat_2.size; cout<<"Enter the hat color: "; cin>>hat_2.color; cout<<"Enter hat price: "; cin>>hat_2.price;

cout<<"Hat 3 "; cout<<"Enter the hat size: "; cin>>hat_3.size; cout<<"Enter the hat color: "; cin>>hat_3.color; cout<<"Enter hat price: "; cin>>hat_3.price; cout<<"Hat 4 "; cout<<"Enter the hat size: "; cin>>hat_4.size; cout<<"Enter the hat color: "; cin>>hat_4.color; cout<<"Enter hat price: "; cin>>hat_4.price; cout<<"Hat 5 "; cout<<"Enter the hat size: "; cin>>hat_5.size; cout<<"Enter the hat color: "; cin>>hat_5.color; cout<<"Enter hat price: "; cin>>hat_5.price; cout<<" RECORD OF HATS "; cout<<"---------------------------------------------------------- "; cout<

return 0; }

Create a program which involve nested structure. What u need to do is to create another structure that related to the structure definition in the program above. For example you may have structure such as BookInfor and AuthorInfor. Therefore you can produce information like the book A is written by the this author B. The program should store five records accordingly.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image
Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Time Series Databases New Ways To Store And Access Data

Authors: Ted Dunning, Ellen Friedman

1st Edition

1491914726, 978-1491914724

More Books

Students explore these related Databases questions

Question

Define Administration?

Answered: 3 weeks ago

Question

Define Decision making

Answered: 3 weeks ago