1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
SCORPION-xisa [38]
3 years ago
14

Write a program that allows you to enter grocery item names into an array of strings and the cost of each item in an array of do

ubles. At the beginning of the program prompt the user to enter the total number of items they will be entering. Max value of 100. After entering the item names and cost, the application should display the names and cost and total cost of all items.
Engineering
1 answer:
harina [27]3 years ago
5 0

Answer:

#include <iostream>

#include <iomanip>

using namespace std;

int main(){

//declare arrays

string ItemName[100];

double ItemCost[100]={0.0};

//declare variable

string name="";

double Total=0.0;

int NumItems=0;

cout<<"Enter number of grocery item you will be entering";

cin>>NumItems

cout<<"\n";

if (NumItems>100)

{

  cout<<"Enter grocery items less than 100"

  cin>>NumItems

  cout<<"\n";

}

for (int i=1;i>=NumItems;i++)

{

  cout<<"Please enter the item name in one word only, Example:                                icecream\n";

  cin>>ItemName[i]

  cout<<"Please enter the cost as a decimal number, Example: 2.05\n\n";

  cin>>ItemCost[i];

}

cout<<"Items"<<"   "<<""$""<<"Cost"<<endl

for (int i=1;i>=NumItems;i++)

{

    cout<<ItemName[i]<<"   "<<"$"<<ItemCost[i]<<endl

}

for (int i=1;i>=NumItems;i++)

{

  Total=Total+ItemCost[i];

}

cout<<"Total:$"<<Total<<endl;

system("PAUSE");

return 0;

}

You might be interested in
Technician A says that for any fuel to burn efficiently, it must be vaporized and fully mixed with the proper amount of air. Tec
Ira Lisetskai [31]

Both technicians are correct

Explanation:

They are each correct for separate reasons. Tech A is correct due to pressure and temperature both being important factors and quantities to vaporize anything. Tech B is correct due to fuel particles being easier to burn due to their chemical structure.

8 0
2 years ago
A mass of 5 kg of saturated water vapor at 100 kPa is heated at constant pressure until the temperature reaches 200°C.
Alex73 [517]

Answer: you can watch a video on how to solve this question on you tube

6 0
4 years ago
In a steam power plant, 1 MW is added in the boiler, 0.58 MW is taken out in the condenser and the pump work is 0.02 MW.
Free_Kalibri [48]

Answer:

a) \eta = 42\,\%, b) COP_{R} = 29

Explanation:

a) The thermal efficiency is:

\eta = \frac{\dot Q_{in} - \dot Q_{out}}{\dot Q_{in}}\times 100\,\%

\eta = \frac{1\,MW-0.58\,MW}{1\,MW} \,\times 100\,\%

\eta = 42\,\%

b) The coefficient of performance is:

COP_{R} = \frac{\dot Q_{L}}{\dot W}

COP_{R} = \frac{0.58\,MW}{0.02\,MW}

COP_{R} = 29

3 0
3 years ago
The voltage valve at which a zirconia O2S switches from rich to lean and lean to rich is
frez [133]
I think the answer is C) 0.25v I’m not sure tho
6 0
3 years ago
The objective of a properly proportioned concrete mix are: a.__________________________________________________________ b.______
sukhopar [10]

Answer:

The objective of a properly proportioned concrete mix are:

  • To produce the combination of cementitious material, water, and aggregate that meets the requirements of a particular structure, portion of a structure, or series of structures at least cost.
  • To produce concrete of the specified properties.
  • To produce a satisfactory of end product, such as beam, column or slab as economically as possible.

Cheers!

4 0
3 years ago
Read 2 more answers
Other questions:
  • Diborane is used in silicon chip manufacture. One facility uses a 500-lb bottle. If the entire bottle is released continuously d
    8·1 answer
  • 1. What types of fire can plain water be used on?
    14·2 answers
  • In successive an object moves from start position, then moves 1ft, 4ft and 8ft. This is an example of a. non-uniform motion b. u
    7·1 answer
  • A 1998 Lexus LS400 has a drag coefficient of 0.28 and a reference area of 2.4 m2. Determine the horsepower required to overcome
    8·1 answer
  • A 50-mm cube of the graphite fiber reinforced polymer matrix composite material is subjected to 125-kN uniformly distributed com
    14·1 answer
  • Choose the correct word or phrase to complete the sentence to explain human intervention in a machine system.
    13·1 answer
  • While examining the color of an engine's coolant: Technician A says that because it is orange, the cooling system should be flus
    8·1 answer
  • Technician A says that much of the lighter GMAW welding work in a body shop can be done with a 115-volt welder. Technician B say
    14·1 answer
  • PTAC and window-unit air conditioners often use rotary compressors, which are effective but susceptible to failure due to high h
    8·1 answer
  • Congress can pass laws concerning ___. (Select all that apply.)
    13·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!