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]
4 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]4 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
10. In CCS, Northing and Easting are
NeTakaya
C. Positive or negative depending on the zone
4 0
3 years ago
Write an application that solicits and inputs three integers from the user and then displays the sum, average, product, smallest
Ganezh [65]

Answer:

3423=6^H

Explanation:

6 0
3 years ago
Create a series of eight successive displacements that would program a robot to move in an octagonal path that is as close as yo
Komok [63]

Answer:

bts biot bts biot jungkukkk

jungkukkkbiot

Explanation:

bts biot bts biot jungkukkk

jungkukkkbiot

5 0
3 years ago
Find the velocity and rate of flow of water through a rectangular channel of 6m wide and 3m deep when it's running full. The cha
Elza [17]

Answer:

V = 1.5062 m/s

Explanation:

look to the photos

5 0
3 years ago
A cylinder 8 in. in diameter and 3 ft long is concentric with a pipe of 8.25 in internal diameter. Between the cylinder and the
yarga [219]

Answer:

What force is requiere to move the cylinder along

Explanation:

The kinematic viscosity of the ol is 0.006 fr2

5 0
3 years ago
Other questions:
  • Three return steam lines in a chemical processing plan enter a collection tank operating at a steady state at 1 bar. Steam enter
    11·1 answer
  • Caulking is recommended around the edges of partitions between apartments to... Group of answer choices reduce the need for trim
    15·1 answer
  • How to build a laser pointer?
    12·1 answer
  • A 4-pole, 3-phase induction motor operates from a supply whose frequency is 60 Hz. calculate: 1- the speed at which the magnetic
    6·1 answer
  • What percentage is 122 out of 222?
    5·2 answers
  • What is your favorite RPG game? ( Role Play Game)
    5·2 answers
  • It is an important part of the differential maintenance which purpose is to make smoother the differential operation by lubricat
    10·1 answer
  • Why are concrete masonry units (CMU) called breeze blocks?
    7·1 answer
  • Describe two fundamental reasons why flexural strength should depend on porosity
    14·1 answer
  • What has alternating electric and magnetic fields that travel in the form of a wave?
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!