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
Nonamiya [84]
3 years ago
15

Create a program, using at least one For Loop, that displays the Sales Amounts in each of 4 regions during a period of three mon

ths. The program should allow the user to enter 4 sets (one set for each region) of three sales amounts (one sales amount for each month). The program should display each regions total sales for the three month period, and the companies total sales (sum of the four regions for three months). Example data below (Remember, the user should be able to enter any data they wish, as long as it follows the below format: Region 1 - 1000, 2000, 3000 Region 2 - 3000, 4000, 6000 Region 3 - 1000, 3000, 2000 Region 4 - 2000, 2000, 4000
Engineering
1 answer:
kari74 [83]3 years ago
5 0

Answer:

C++ code explained below

Explanation:

/*C++ program that prompts sales for four regions of three sales and prints

the sales values to console */

#include<iostream>

#include<iomanip>

#include<cstring>

using namespace std;

int main()

{

  //set constant values

  const int SALES=3;

  const int REGIONS=4;

  //create an array of four regions

  string regionNames[]={"Region 1","Region 2","Region 3","Region 4"};

  //create a 2D array to read sales

  int sales[REGIONS][SALES];

  //read sales for four regions

  for(int region=0;region<REGIONS;region++)

  {

      cout<<regionNames[region]<<endl;

      for(int sale=0;sale<SALES;sale++)

      {

          cout<<"Enter sales ";

          cin>>sales[region][sale];

      }

  }

  //print sales

  for(int region=0;region<REGIONS;region++)

  {

      cout<<regionNames[region]<<"-";

      for(int sale=0;sale<SALES;sale++)

      {

          cout<<setw(5)<<sales[region][sale];

      }

      cout<<endl;

  }

  //pause program output on console

  system("pause");

  return 0;

}

You might be interested in
Calculate the viscosity(dynamic) and kinematic viscosity of airwhen
nikitadnepr [17]

Answer:

(a) dynamic viscosity = 1.812\times 10^{-5}Pa-sec

(b) kinematic viscosity = 1.4732\times 10^{-5}m^2/sec

Explanation:

We have given temperature T = 288.15 K

Density d=1.23kg/m^3

According to Sutherland's Formula  dynamic viscosity is given by

{\mu} = {\mu}_0 \frac {T_0+C} {T + C} \left (\frac {T} {T_0} \right )^{3/2}, here

μ = dynamic viscosity in (Pa·s) at input temperature T,

\mu _0= reference viscosity in(Pa·s) at reference temperature T0,

T = input temperature in kelvin,

T_0 = reference temperature in kelvin,

C = Sutherland's constant for the gaseous material in question here C =120

\mu _0=4\pi \times 10^{-7}

T_0 = 291.15

\mu =4\pi \times 10^{-7}\times \frac{291.15+120}{285.15+120}\times \left ( \frac{288.15}{291.15} \right )^{\frac{3}{2}}=1.812\times 10^{-5}Pa-swhen T = 288.15 K

For kinematic viscosity :

\nu = \frac {\mu} {\rho}

kinemic\ viscosity=\frac{1.812\times 10^{-5}}{1.23}=1.4732\times 10^{-5}m^2/sec

3 0
3 years ago
A box-shaped aquarium has horizontal dimensions 0.5 m by 1 m, and depth 0.5 m, and is filled two-thirds of the way to the surfac
antoniya [11.8K]

Answer:

3270 N/m^2

Explanation:

we can calculate the pressure difference between the bottom and surface of the tank by applying the equation for the net vertical pressure

Py = - Ph ( g ± a )

for a downward movement

Py = - Ph ( g - a )  ------ ( 1 )

From the above data given will  be

p = 1000 kg/m^3, h = 2/3 * 0.5 = 0.33 m , a =2g , g = 9.81

input values into equation 1  becomes

Py =  -Ph ( g - 2g ) = Phg ------ ( 3 )

Py = 1000 * 0.33 * 9.81

    = 3270 N/m^2

6 0
3 years ago
As the junior engineer at the Mesabi Range Hydraulic Engineering Company located in Ely, Minnesota, you have been tasked with de
katen-ka-za [31]

yes it will

Explanation:

5 0
3 years ago
Which examples demonstrate tasks commonly performed in Maintenance/Operations jobs? Check all that apply.
Verdich [7]

1.Ross fixes a dishwasher for a homeowner.

3.Cassandra fixes holes in an old road.

4 0
3 years ago
Read 2 more answers
Am I alive I really need to know?
Nesterboy [21]
Hell no,cause i’m not
5 0
3 years ago
Other questions:
  • A two-stroke CI. engine delivers 5000 kWwhile using 1000 kW to overcome friction losses. It consumes 2300 kg of fuel per hour at
    14·1 answer
  • A composite wall is composed of 20 cm of concrete block with k = 0.5 W/m-K and 5 cm of foam insulation with k = 0.03 W/m-K. The
    13·1 answer
  • ITS FOR DRIVERS ED!!
    13·2 answers
  • An electric power plant uses solid waste for fuel in the production of electricity. The cost Y in dollars per hour to produce el
    10·1 answer
  • Marie and James are bubbling dry pure nitrogen (N2) through a tank of liquid water (H2O) containing ethane (C2H6). The vapor str
    5·1 answer
  • The figure below appeared three heat treatments processes of steel (A, B and C),
    14·1 answer
  • Does an electronic clock use electrical energy?​
    10·2 answers
  • Which of the following characteristics would not give animals an advantage in the ocean?
    13·1 answer
  • Basic C++ For Loop I'm trying to learn. Replit tells me that the for in the forloop is an error, but I don't know what's wrong.
    7·1 answer
  • A red circle and diagonal slash on a sign means that:.
    10·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!