Question

QUESTION 5 14 marks A bathroom warehouse keeps the following information for the items in stock: [description(a string, for e

0 0
Add a comment Improve this question Transcribed image text
Answer #1

If you have any problem with the code feel free to comment.

Program

#include <iostream>

using namespace std;

//Item structure
struct Itemto
{
string description;
string codeto;
string color;
int number;
float price;
};

int main()
{
//creating an item
struct Itemto item = {"soap", "12345", "blue", 5, 2.5};
//printing the item
cout<<"Description: "<<item.description<<endl;
cout<<"Code: "<<item.codeto<<endl;
cout<<"Color: "<<item.color<<endl;
cout<<"Number in Stock: "<<item.number<<endl;
cout<<"Price: $"<<item.price<<endl;
}

Output

Description: soap Code: 12345 Color: blue Number in Stock: 5 Price: $2.5 Process returned © (@xo) execution time : 0.030 s Pr

Add a comment
Know the answer?
Add Answer to:
QUESTION 5 14 marks A bathroom warehouse keeps the following information for the items in stock:...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • A bathroom warehouse keeps the following information for the items in stock: description(a string, for example...

    A bathroom warehouse keeps the following information for the items in stock: description(a string, for example "bath") codeto distinguish between items with the same description and color but of a different design (a string to store 6 digits, for example “123456") color(a string, for example "white") numberin stock (an integer, for example 49) price(a floating point number, e.g. 349.95) 5.1 Write down the declaration for a structfor storing the information associated with one kind of item in stock. Give the...

  • QUESTION 5 14 marks A bathroom warehouse keeps the following information for the items in stock:...

    QUESTION 5 14 marks A bathroom warehouse keeps the following information for the items in stock: description(a string, for example "bath") codeto distinguish between items with the same description and color but of a different design (a string to store 6 digits, for example "123456") color(a string, for example "white") numberin stock (an integer, for example 49) price(a floating point number, e.g. 349.95) 5.1 Write down the declaration for a struct for storing the information associated with one kind of...

  • A bathroom warehouse keeps the following information for the items in stock: O description(a string, for...

    A bathroom warehouse keeps the following information for the items in stock: O description(a string, for example "bath”) codeto distinguish between items with the same description and color but of a different design (a string to store 6 digits, for example "123456") color(a string, for example "white") numberin stock (an integer, for example 49) price(a floating point number, e.g. 349.95) 5.1 Write down the declaration for a structfor storing the information associated with one kind of item in stock. Give...

  • 90% - e QUESTIONS T4 marks A bathroom warehouse keeps the following information for the items...

    90% - e QUESTIONS T4 marks A bathroom warehouse keeps the following information for the items in stock: description a string. For example "bath) codete distinguish between items with the same description and color but of a different design (a string to store 6 digits, for example "123456") colorfa string, for example "white") numberin stock (an integer, for example 49) O pricela floating point number, e 349.95) 5.1 Write down the dedaration for a struct for storing the information associated...

  • QUESTIONS 14 marks A bathroom warehouse keeps the following information for the items in stock: o...

    QUESTIONS 14 marks A bathroom warehouse keeps the following information for the items in stock: o description(a string, for example "bath") O code to distinguish between items with the same description and color but of a different design (a string to store 6 digits, for example "123456") col or (a string, for example "white") Onunber in stock (an integer, for example 49) pri cela floating point number, e.g. 349.95) Write down the declaration for a struct for storing the information...

  • A bathroom warehouse keeps the following information for the items in stock: description(a string, for example...

    A bathroom warehouse keeps the following information for the items in stock: description(a string, for example "bath”) codeto distinguish between items with the same description and color but of a different design (a string to store 6 digits, for example "123456") color(a string, for example "white") numberin stock (an integer, for example 49) price(a floating point number, e.g. 349.95) 5.2 Assume that an array Item stock [50] has been declared and that information for 50 items in stock has been...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT