Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Please help me with that. Thanks Write a C++ program that will 1. Declare two vectors a. One of integer b. One of float or

Please help me with that. Thanks

image text in transcribed

Write a C++ program that will 1. Declare two vectors a. One of integer b. One of float or double 2. Using a loop, prompt the user to input the quantity and cost of eight items. a. Quantity should be stored in the integer vector and cost should be stored in the float or double vector 3. Within a function, a. Print the quantity, cost and total cost of items on hand (total cost of items must be calculated), for each of the items entered in the vectors. (Ex Looking at the first line of output, if quantity is 3 and cost is 10.12, the output should appear as follows: Onty Cost 10.12 18.28 Total 30.36 18.28 1 NOTE: All dollar amounts should be displayed with two decimal places

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 Design Application Development And Administration

Authors: Michael V. Mannino

4th Edition

0615231047, 978-0615231044

More Books

Students also viewed these Databases questions