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
bonufazy [111]
3 years ago
12

Write a program that lets a maker of chips and salsa keep track of sales for five different types of salsa: mild, medium, sweet,

hot, and zesty. The program should use two parallel 5-element arrays: an array of strings that holds the five salsa names and an array of integers that holds the number of jars sold during the past month for each salsa type. The salsa names should be stored using an initialization list at the time the name array is created. The program should prompt the user to enter the number of jars
Engineering
1 answer:
S_A_V [24]3 years ago
8 0

Answer:

#include <iostream>

#include <iomanip>

using namespace std;

//main function

int main ()

{

//Variable declartion

const int typesOfSalsa = 5;

const int stringSize = 7;

char salsa [typesOfSalsa][stringSize] = {"mild","medium","sweet","hot","zesty"};

int numOfJarsSold [typesOfSalsa];

int totalJarsOfSalsa = 0;

int highest;

int lowest;

for (int count = 0; count < typesOfSalsa; count++)

{

 cout<< "Enter the number of " <<salsa[count]<<" salsa jars sold in the past month: ";

 cin>> numOfJarsSold[count];

 while (numOfJarsSold[count]<0)

 {

  cout<< "Please enter a positive number: ";

  cin>> numOfJarsSold[count];

 }

 

 totalJarsOfSalsa += numOfJarsSold[count];

}

for (int count = 0; count < typesOfSalsa; count++)

{

 cout<< "Number of " <<salsa[count]<< " salsa jars sold in the past month: "<<numOfJarsSold[count]<<endl;

}

cout<<"Total number of jars sold in the past month: "<<totalJarsOfSalsa<<endl;

highest = numOfJarsSold[0];

for (int count =0; count < typesOfSalsa;count++)

{

 if (numOfJarsSold[count]> highest)

 {

  highest = numOfJarsSold[count];

 }

}

cout<<" The highest selling product is: "<<highest<<endl;

lowest = numOfJarsSold[0];

for (int count =0; count < typesOfSalsa;count++)

{

 if (numOfJarsSold[count] <lowest)

 {

  lowest = numOfJarsSold[count];

   

 }

 

}

cout<<" The lowest selling product is: "<<lowest<<endl;

system("pause");

}

You might be interested in
A spherical seed of 1 cm diameter is buried at a depth of 1 cm inside soil (thermal conductivity of 1 Wm-1K-1) in a sufficiently
postnew [5]

Answer:

Find the attachment for the answer

8 0
3 years ago
How high of a column of sae 30 oil would be required to give the same pressure as 700 mm hg?
Rasek [7]

Hoiu-10,4000 mm.

<h3>Is positive pressure good for PC?</h3>
  • A balanced configuration is the most efficient way to cool your pc although it should tend towards a slight positive pressure if you can help it.
  • Tip: As much as it might seem important, the concept of heat rising doesn't have too much of an effect.

To learn more about it, refer

to https://brainly.in/question/413163

#SPJ4

7 0
2 years ago
The steel 4140 steel contains 0.4% C, however, it shows higher yield strength and ultimate strength than that of the 1045 (0.45%
Aleonysh [2.5K]

Answer:

4140 steel contains 0.4% C  having higher yield strength and ultimate strength than the 1045 steel contains 0.45% C

Explanation:

we have given 4140 steel contains 0.4% C

we know here that 4140 steel is low steel alloy , and it have low amount of chromium , manganese etc alloying element

and these elements which are present in 4140 steel they increase yield strength and ultimate strength of steel

while in 1045 steel contains 0.45 % c is plain carbon steel

and it do not contain any alloying element

so that 4140 steel contains 0.4% C  having higher yield strength and ultimate strength than the 1045 steel contains 0.45% C

4 0
3 years ago
Consider the expansion of a gas at a constant temperature in a water-cooled piston-cylinder system. The constant temperature is
Leona [35]

Answer:

Q_{in} = W_{out} = nRT ln (\frac{V_{2}}{V_{1}})

Explanation:

According to the first thermodynamic law, the energy must be conserved so:

dQ = dU - dW

Where Q is the heat transmitted to the system, U is the internal energy and W is the work done by the system.

This equation can be solved by integration between an initial and a final state:

(1) \int\limits^1_2 {} \, dQ = \int\limits^1_2 {} \, dU - \int\limits^1_2 {} \, dW

As per work definition:

dW = F*dr

For pressure the force F equials the pressure multiplied by the area of the piston, and considering dx as the displacement:

dW = PA*dx

Here A*dx equals the differential volume of the piston, and considering that any increment in volume is a work done by the system, the sign is negative, so:

dW = - P*dV

So the third integral in equation (1) is:

\int\limits^1_2 {- P} \, dV

Considering the gas as ideal, the pressure can be calculated as P = \frac{n*R*T}{V}, so:

\int\limits^1_2 {- P} \, dV = \int\limits^1_2 {- \frac{n*R*T}{V}} \, dV

In this particular case as the systems is closed and the temperature constant, n, R and T are constants:

\int\limits^1_2 {- \frac{n*R*T}{V}} \, dV = -nRT \int\limits^1_2 {\frac{1}{V}} \, dV

Replacion this and solving equation (1) between state 1 and 2:

\int\limits^1_2 {} \, dQ = \int\limits^1_2 {} \, dU + nRT \int\limits^1_2 {\frac{1}{V}} \, dV

Q_{2} - Q_{1} = U_{2} - U_{1} + nRT(ln V_{2} - ln V_{1})

Q_{2} - Q_{1} = U_{2} - U_{1} + nRT ln \frac{V_{2}}{V_{1}}

The internal energy depends only on the temperature of the gas, so there is no internal energy change U_{2} - U_{1} = 0, so the heat exchanged to the system equals the work done by the system:

Q_{in} = W_{out} = nRT ln (\frac{V_{2}}{V_{1}})

4 0
4 years ago
Repetitive movements at work can lead to injuries. True or False
OverLord2011 [107]
Answer

True

Explanation

RSI can occur when you do repetitive movements. Those movements can cause your muscles and tendons to become damaged over time. Some activities that can increase your risk for RSI are: stressing the same muscles through repetition.
8 0
3 years ago
Other questions:
  • Consider the following pulley system. A block of mass m is connected to a translational spring of stiffness k through a cable, w
    10·1 answer
  • Choose the true statement from those shown below: A Merchant Account allows you to use SSL on your web site. Disadvantages of us
    14·1 answer
  • Define ""acidity"" of an aqueous solution. How do you compare the strength of acidity of solutions ?
    6·1 answer
  • A 450 MWt combined cycle plant has a Brayton cycle efficiency of 24% and a Rankine cycle efficiency of 29% with no heat augmenta
    6·1 answer
  • Generally natural shape of stone is in shaped as (a)angular (b)irregular (c)cubical cone shape (d)regular
    10·2 answers
  • If a machine uses LESS effort to overcome a given resistance force (if Fe is less than FR), it has an actual mechanical advantag
    13·1 answer
  • 11. Technician A says that gasoline storage containers should be painted red. Technician B says that any metal container may be
    7·1 answer
  • The Greek alphabet has 24 distinct lowercase letters. How many bits are needed to be able to encode any single lowercase Greek l
    9·1 answer
  • I will put other link in comments
    12·1 answer
  • Christopher has designed a fluid power system that repeatedly gets clogs. Which of the following objects should he choose to add
    13·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!