Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Please give me answer as soon as possible . Thank you Write a program that reads product Information into an Item structure and calculates inventory

image text in transcribed Please give me answer as soon as possible . Thank you
Write a program that reads product Information into an Item structure and calculates inventory Information (See Sample Output below). Each Item should have a name, cost, and a quantity Store the items into an array of Item structure that can hold 3 elements The program should output the total number of inventory items, the total cost of all the items, and the cheapest item. Item data should be stored in a struct variable of the type Item, which has three components: name (string) cost (double) quantity (integer) There are 3 items. Use an array with 3 elements of the data type Item. 1. Read the item information into the structure array from the console. 2. Calculate the total quantity of all 3 items. 3. Calculate the total cost of all 3 items. 4. Find the index of the cheapest item. Sample Output: Product #1 Enter name: Backpack Enter coat: 4 9.99 Enter quantity: 5 Product #2 Enter name: Sneakers Enter cost: 82.99 Enter quantity: 10 Product #3 Enter name: Gatorade Enter cost: 2.50 Enter quantity: 100 Total number of items: 115 Total value of inventory: $1329.85 Cheapest item: Gatorade WRITE your name In a block or inline comment at the top of your program. PRINT and attach a copy of your source code and output to this worksheet. UPLOAD your source code as Iab12.cpp to my website

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

Step: 3

blur-text-image

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

Database Programming With Visual Basic .NET

Authors: Carsten Thomsen

2nd Edition

1590590325, 978-1590590324

More Books

Students also viewed these Databases questions

Question

9. Describe the characteristics of power.

Answered: 1 week ago