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
Tatiana [17]
2 years ago
6

KDS Company has 3 departments: 1. Dept X 2. Dept Y 3. Dept Z. Design a program that will read as input each department's sales f

or each quarter of the year, and display the result for all divisions.
Computers and Technology
1 answer:
stiv31 [10]2 years ago
6 0

Complete Question:

Design a program that will use a pair of nested loops to read the company's sales amounts. The details are as follows: -

KDS Company has 3 departments: 1. Dept X 2. Dept Y 3. Dept Z. Design a program that will read as input each department's sales for each quarter of the year and display the result for all divisions. Use a two-dimensional array that will have 3 rows and 4 columns

Answer:

In C++:

#include<iostream>  

using namespace std;  

int main() {  

   int depts[3][4];

   char dptcod [3] ={'X','Y','Z'};

   for (int rrw = 0; rrw < 3; rrw++) {  

       for (int cll = 0; cll < 4; cll++) {  

           cout<<"Dept "<<dptcod[rrw]<<" Q"<<(cll+1)<<": ";

           cin>>depts[rrw][cll];  }  }  

       for (int rrw = 0; rrw < 3; rrw++) {  

           int total = 0;

           for (int cll = 0; cll < 4; cll++) {  

               total+=depts[rrw][cll]; }

               cout<<"Dept "<<dptcod[rrw]<<" Total Sales: "<<total<<endl;}  

   return 0; }

Explanation:

This declares the 3 by 4 array which represents the sales of the 3 departments

   int depts[3][4];

This declares a character array which represents the character code of each array

   char dptcod [3] ={'X','Y','Z'};

This iterates through the row of the 2d array

   for (int rrw = 0; rrw < 3; rrw++) {  

This iterates through the column

       for (int cll = 0; cll < 4; cll++) {

This prompts the user for input

           cout<<"Dept "<<dptcod[rrw]<<" Q"<<(cll+1)<<": ";

This gets the input

           cin>>depts[rrw][cll];  }  }  

This iterates through the row of the array

       for (int rrw = 0; rrw < 3; rrw++) {

This initializes total sum to 0

           int total = 0;

This iterates through the column

           for (int cll = 0; cll < 4; cll++) {

This calculates the total sales of each department

               total+=depts[rrw][cll]; }

This prints the total sales of each department

               cout<<"Dept "<<dptcod[rrw]<<" Total Sales: "<<total<<endl;}  

You might be interested in
A _____ network is where all computers are equal and each one is both data requester and data provider.
andre [41]

Answer:

peer-to-peer network

Explanation:

i think i'm not sure though so tell me if it is wrong :)

8 0
2 years ago
What option is available on a Host A record to tell the system how long the record should remain in the database after it was cr
lapo4ka [179]

Answer:

Time to live.    

Explanation:

The Time to Live is used for the purpose of the expiration table in the rows dynamically.The Time to live is represented in the time limit to stay in the database the Time to live It is no longer possible to fetch the data that has passed its closing timeout value also it is not displayed in the store metrics.

The Time to live is available on the host in the log informing the system how long the record will stay in the database after it has been generated or last modified.

8 0
2 years ago
Where in the Formula tab on the ribbon would you find the Use in Formula function?
Leviafan [203]

Answer:

In Function library you would find the use in Formula function

5 0
2 years ago
Read 2 more answers
What is aperture priority mode? When might you use this mode on a camera? What is depth of field? How can you adjust the depth o
raketka [301]

Answer:

Please check explanation

Explanation:

We abbreviate aperture priority by A or Av( which is used for aperture value) on the camera mode call up, which is an adjustment on some of the cameras which leverage the user to adjust the certain value of the aperture or the f-number as meanwhile the camera adjust the speed of the shutter ensuring it matches it, and which results in a good exposure depending on the condition of the light  as being measured via the light meter. And this is not the same as the manual mode, in which the user is compelled to make the decision for both the values, the priority of the shutter, the location the user selects the shutter speed while the camera picks up the correct aperture, as well as the program state, where camera picks each of them.

So the first two questions are answered. Let's see the third, the depth of the field.  It is the distance from the nearest to the furthest objects which provides an image being selected for being at the focus in a camera.

Hence the depth of the field means the range of the sharp focus in a certain photograph. And while you shoot with the help of the larger camera like the DSLR, you will be able to adjust the depth through the adjustment of the aperture of the lens. The aperture is nothing else but the opening within the lens which manages the amount of the light that is permitted via the lens.

Now come to the fifth question. The shutter speed and the aperture are being related directly. It improves the aperture (by a stop). And each of them comes up with the very best exposure through the permitted weight of light.

And both of them are related to each other in an inverse proportion. And both of them must be balanced for ensuring that the image is not being exposed or less exposed to the permitted light. And when the aperture is increased the shutter speed increased for balancing it as well as vice versa.

Landscape mode:

It is the kind of page orientation that prints out the picture in a horizontal manner rather than in a vertical manner. And it is being commonly used for printing the charts or various other types of pictures as well as the text which might not adjust properly with the page that is aligned vertically.

Consider the High Nikon DSLR. You need to hold down the "MODE" as meanwhile the rear control (dial)  is turned unless you view "A" over the LCD top. And your FCD then sets the aperture. And in almost all Canon SLRs as an example: You need to turn to "Av" your mode dial.

The results of these adjustments are certainly good.

And the shutter speed is being measured by the unit of time and ranges in less than fractions of one second. And as we say that the shutter speed is "5000", it means its 1/30000 th of a  minute. And the shutter speed which is of one second or more in length is being marked as a'. One example is 16'.

How we measure aperture. And what it means:

It is being measured with the help of the f-stop scale. And on the digital camera, you will find 'f/' which is being followed by an integer. And this f-number indicates the wideness of the aperture. As well as the size does affect the exposure as well as the field depth of the resultant image.

Now come to why we should learn to control the shutter speed and the aperture.

You should know that by selecting the shutter speed you permit yourself to freeze or otherwise blur motion, and sometimes you would like to do the first one or the second one. And the aperture permits you to select the field depth to either blur the background or make it sharper.

Thus, now you have an idea of each of the modes, and their merits. And if you will ask the best one, he will be up with the aperture priority or with auto ISO and full manual. If you are up with some specific requirements, then you should have a full manual mode in automatic mode, and that will be quite handy. You certainly need to learn by heart how to make use of the full manual, as it will improve your understanding of the photography, however, the semi-automatic mode is certainly your best friend.

And yes, as well as its a very great feeling. Its certainly quite hard to take the photographs of still objects while you are riding.

Some of the things that make it hard to take the action photographs are like the object, or the animal can move as well as you need to set the shutter speed as well as the aperture speed quite swiftly. Also, you need to focus your camera for ensuring a very good picture and ensure its not blurry or like the picture is out of the focus.

In night photography, the camera might shake because of the very low ambient brightness, the camera might move for very slow shutter speed. Various other challenges are the improper focus, white balances, less exposure, etc,

That solves all the questions asked.

3 0
3 years ago
All slides in a presentation must use the same transition. True or False?
krek1111 [17]
False. you can make different slides have different transitions
7 0
3 years ago
Read 2 more answers
Other questions:
  • Which windows tool is used to determine if a dynamic disk is corrupted?
    6·1 answer
  • You took a fantastic photograph that you want to use in the report you're writing using DTP software. To import the photo into y
    6·2 answers
  • What is the opening page of a website called?
    9·2 answers
  • Write a program that utilizes the concept of conditional execution, takes a string as input, and: prints the sentence "Yes - Spa
    8·1 answer
  • With which type of media are you interacting when you read an online shopping website?
    7·1 answer
  • In chapter 3, we discussed syntax and semantics, in general there are two types of grammars for programming languages, regular a
    14·1 answer
  • 16 to 19 year old drivers are how many more times likely to crash? 1.7,2.7,0.7 ,3.7
    12·2 answers
  • The wildcard character * (asterisk/start) and ? (question mark) are the same and can be use interchangeably.
    6·1 answer
  • Describe a cellular network, its principle<br> components and how it works.
    7·1 answer
  • Please respond not with answer but with comment.
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!