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.

Answers

Answer 1

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;}  


Related Questions

plzzzzzzz fast I need help

Coaxial cable is an example of transmission cable

A) true

B) false

Answers

The answer is false so B

PLEASE HELP ILL GIVE BRAINLIEST

Answers

Answer:

text labels and different

Explanation:

Which is an example of an objective in a game?

a
the player is supposed to explore the map until they find every hidden item
b
the game has a store where the player can upgrade items
c
the game is bright and colorful
d
the game has multiple objects that the player can interact with

Answers

The answer to this is A

Answer:

answer is A or C

Explanation:

Whats the formatting of a letter to the editor?​

Answers

Answer:

Date: Make sure to write the date below the sender's address excluding one space or line. Receiving Editor's address: You should mention the address of the recipient that is the editor's address. The Subject of the letter: It must convey the main purpose of the letter to the readers.

Explanation:

Hope this will help

Noise can be a barrier to communication. True or False ​

Answers

Answer:

True

Explanation:

This is true because noise is one of the most common communication barriers.

Answer:

True!

Explanation:

Noise is a strong barrier that makes it hard to communicate!

What are the basic tasks performed by an operating system?​

Answers

Answer:

An operating system is a software which performs all the basic tasks like file management, memory management, process management, handling input and output, and controlling peripheral devices such as disk drives and printers.

Explanation:

i hope it helps:)

game development is a time-consuming and expensive endeavor, and being a Lone Ranger is a recipe for disaster
True or False

Answers

False although depends on the future of the person's ideas

The statement that game development is a time-consuming and expensive endeavor is false.

What is game development?

Game development is designing or creating game software. It also involves generating new concepts of game and new graphics software and new technologies.

Thus, the correct option is false.

Learn more about game development

https://brainly.com/question/19837091

#SPJ2

Scott does not use privacy settings on his social media

Answers

Answer:

ARREST HIM!!!

Explanation:

Answer:

Explanation

arrest him

what is the output if the user enters -5 and where do I input the negative 5

Answers

Answer:

An input of -5 gives an output of 4

Explanation:

Given

The attached program

Required

The output when input is -5

Analyzing the program line by line:

This defines the function tryIt. It gets the parameter from the main method.

So, if the user enters -5, -5 is passed into the function through argument a

def tryIt(a,b=7):

This calculates a + b, and returns the sum to the main: a = -5 and b = 7.

   return a + b

So: -5 + 7 = 2; 2 is returned to the main method

The main begins here

#MAIN

This is where you get to input -5

n =int(input("Enter a number: "))

The multiplies the returned value by 2.

ans = tryIt(n)*2

tryIt(-5) = 2. So: ans = 2 * 2; ans = 4

This prints 4

print(ans)

According to the video, what are some common work environments for Electrical Power-Line Installers and
Repairers? Check all that apply.
working in mines
working underground in manholes
O sitting at desks
O climbing utility poles
working in customers' homes
standing in a truck-mounted bucket

Answers

Answer:

2

4

6

Explanation: I got is wrong for y'all to get it right

Answer:

2 4 6

Explanation:

edge 2023

why does a wooden spoon not get hot when used in stirring hot liquids​

Answers

Answer:

Explanation:

A wooden spoon does not get hot when used in stirring hot liquids​ is because its an insulator.

Hurrryyyy it’s either a or c

How does the use of modules provide flexibility in a structured programming design?

Modules enable multiple programmers to work on a program at the same time
Modules enable a linear approach to software development
Modules ensure the reuse of code variables.
Modules ensure that a program will be completed on time.

Answers

Answer and Explanation:

I believe its A. Modularity enables multiple programmers to work on a program at the same time..

Let me know if I'm wrong..

Non-delivered goods, counterfeit products, fraudulent payments are common type of cyber crime these

days.

a. What are such types of cyber crimes collectively called?

b. What are counterfeit products?

c. What measures can you take to stop fraudulent payments? Write any two measures.​

Answers

Answer:

a. Internet auction fraud

b. Counterfeit products are products made and/or sold under the brand name of a product of a higher quality

c. 1) Monitor business transactions

2) Use an Address Verification System AVS

Explanation:

a. Such types of cyber crimes are collectively called Internet auction fraud

Internet or online auction fraud is a form of fraud that involves the act of providing misleading information about goods paced on advert for sale on an online auction site, including the sale of counterfeit goods, sale of goods of poor quality, receiving a different item from what was ordered, artificial bidding to increase price, omission of important information about a product, delivering an item that looks different from what was displayed on the website and the non-delivery of an item already to the buyer.

A seller can be a victim of the internet auction fraud when a buyer does not pay for goods an/or services received, request for delivery before payment, the buyer pays with a stolen credit card, the buyer uses a fake escrow account such that the money returns to the buyer after receiving the goods

b. Counterfeit products or goods are products that are being manufactured and marketed, without formal authorization, under the name of a popular and recognized but are usually of lesser quality than the product they try to imitate

c. Measures that can be taken to stop fraudulent payments are;

1) Monitor transactions to to check for red flags, including disparity in shipping and billing information

Monitor transactions from customer that use free or anonymous emails services which can easily be opened and closed without payment or proper  documentation

2) Make use of Address Verification System to authenticate the billing address on a payment, and the address on the credit card.

a) Internet is owned by:
a) US Government.
b) Europe.
c) Asian Countries.
d) Nobody owns internet.​

Answers

Answer:

D. Nobody owns internet

I'm getting pretty desperate plz help me, I'll give brainiest, and ill make a free question worth 100 points this is for coding FLVS fine ill put it 100 plz help meee





Part 1: Plan and Write the Pseudocode
Using pseudocode, write an algorithm that someone else can follow.
Decide on a question to ask the user. Some ideas include:
What grade are you in?
What sport do you play?
Where did you go on vacation?
Use one variable to store the response.
Use one if-else statement to make a decision based on the user's input.
Display two messages; one for each condition (True and False).
Insert your pseudocode here: (you only need to do one)
Flowchart
Write it out

Get input:

If statement:

Print if true:

Print if false:


Part 2: Code the Program
Use the following guidelines to code your program.
Use the Python IDLE to write your program.
Using comments, type a heading that includes your name, today’s date, and a short description.
Set up your def main(): statement. (Don’t forget the parentheses and colon.)
Write one if-else statement using user input.
Include a print message for both conditions (True and False).
Conclude the program with the main() statement.
Follow the Python style conventions regarding indentation in your program.
Run your program to ensure it is working properly. Fix any errors you may observe.
When you've completed writing your program code, save your work by selecting 'Save' in the Python IDLE. When you submit your assignment, you will attach this Python file separately.

Part 3: Post Mortem Review (PMR)
Using complete sentences, respond to all the questions in the PMR chart.
Review Question
Response
What was the purpose of your program?

How could your program be useful in the real world?

What is a problem you ran into, and how did you fix it?

Describe one thing you would do differently the next time you write a program.




Part 4: Save Your Work
Don't forget to save this worksheet. You will submit it for your assessment.

you can also give me a link to your work and ill use it as a guide I will not copy
my g mail is my user name

Answers

Answer:

give other guy brainliest

Three of these simple machines are similar to one another. Choose the one that does not belong with this group. pulley, wheel and axle, lever, wedge.​

Answers

Answer:

wedge

Explanation:

the rest all move by pulling while the wedge needs to be hit

c) Internet is a:
a) A single network.
b) A vast collection of different networks
c) Interconnection of LAN.
d) None of these.​

Answers

I think the answer is a single network

Answer:

a vast collection of different

networks

Write a program in java to enter a character.The program displays the message "uppercase vowel" if entered character is uppercase vowel.Otherwise,displays the message "not an uppercase vowel".

Answers

Answer:

d

Explanation:

i think

FIFTY POINTS IF YOU CAN HELP ME!!!!

You have been looking for a part-time job and it looks like you have found a good fit. You researched the listings on a job board, emailed your résumé to the company’s HR department, and got a phone call back. They gave you login information for a private system so you could take an online test, and now you’ve just had an online video interview. Which networking features have you used so far in your job search?

Answers

it only say 25oints i wanted 50 so no can do my guy

Email, phone, browser, Zoom
I’m just guessing because you lied abt the points

Complete the procedure for forwarding a message by selecting the correct term from each drop-down menu.
1. ___ or open a message.
2. Click the Forward button.
3. In the To field, enter the names of intended recipients.
4. Click the ___ button.

Answers

Answer:

Preview; send.

Explanation:

Communication can be defined as a process which typically involves the transfer of information from one person (sender) to another (recipient), through the use of semiotics, symbols and signs that are mutually understood by both parties. One of the most widely used communication channel or medium is an e-mail (electronic mail).

An e-mail is an acronym for electronic mail and it is a software application or program designed to let users send texts and multimedia messages over the internet.

The procedure for forwarding a message to a recipient include;

1. Preview or open a message. This is to ensure that the appropriate or specific message is selected.

2. Click the Forward button. This button opens the dialog box to allow the sender input various details about the message and the recipient.

3. In the To field, enter the names of intended recipients.

4. Click the send button. This button automatically forwards the message to the intended recipient(s).

Am I missing something?

Answers

Shshahw auehebehej jagehevehe suene she e e r r d f g g g e de w ehehejenebe e e where

which is NOT something that a game producer needs to do?

A- make sure the team has the tools that they need to be successful
B- create and support ways for the team to collaborate
C- plan the script, characters, and how the game is played
D- choose the programming language that will be used to develop the game

Answers

Answer:

Plan the script, characters, and how the game is played

An action that a game producer needs not to do is to plan the script, characters, and how the game is played. Thus, the correct option for this question is C.

What are the actions that a game producer needs to do?

The actions that a game producer needs to do are as follows:

They choose the programming language that will be used to develop the game.They considerably create and support ways for the team to collaborate on the same mission. They always make sure the team has the tools that they need to be successful togetherly.

Apart from this, video game producers have to manage a lot of things. Such as constructing video games, playing an executive role during each development phase, ensuring the quality of the project, managing the timeliness of the teams working on the same project (duration), etc.

Therefore, an action that a game producer needs not do is plan the script, characters, and how the game is played. Thus, the correct option for this question is C.

To learn more about Game producers, refer to the link:

https://brainly.com/question/3863314

#SPJ2

Question 11 of 20
Which of the following reasons for writing a formal business document would
lead you to write a proposal?
A. To convince your manager to use a new meeting organization tool
O B. To summarize what happened during a meeting
O C. To describe what tasks you completed during the week
D. To tell your manager a project is on budget and on schedule
SUBMIT
Ex

Answers

Answer: A.) To convince your manager to use a new meeting organization tool

Explanation:

Sean Cody is a website most known for what?

Answers

Answer:

Sean Cody is a website most known for to translate English to Portuguese.

is an website from the portugués

Anna's house is old and needs quite a few repairs that she
cannot afford out-of-pocket. What type of loan does she need?

Answers

Answer:

Home equity

Explanation:

Hope this helps    :)

what are the 3 rules of music

ps: there is no music subject so i had to put something else

Answers

Answer:

Rules that apply to all situations and accasions in the music room

Explanation:

I hope this helps

Answer:

playing at any one time in your song 2,working beyond 3or 4 elements at once can crowd your track 3,making it harder for your audience to connect and recall ur composition

What is Colby Knox known for?

Answers

Answer:The School in the Woods. Colby Knox is known for his work on The School in the Woods

Explanation:

Answer:

the school on the wood ghost is known as Colby Knox.

A search will _____ determine the index of the goal.

A. always
B. never
C. sometimes

Answers

Answer:

The correct answer is C. Sometimes.

Explanation:

A database index is a structure that aims to speed up selections and selective operations on a database. An index reduces the number of comparisons required to find one or more database records. This avoids having to perform a so-called full table scan, whereby all records in the table have to be run through sequentially.

Therefore, if the search does not focus correctly on the necessary data, this search will not always determine the index of the goal. Therefore, the user must correctly handle the search keywords to collaborate with the system.

Write a program to accept two numbers
in two lines and find Square root of Squares
of thion​

Answers

Answer: Here you go, change it however you like :)

Explanation:

num1 = int(input("Enter a number: "))

num2 = int(input("Enter a number: "))

print(f"square root of num1: {num1**0.5}")

print(f"square root of num2: {num2**0.5}")

list 5 ways that computers could be used in a school or university

Answers

Answer:

Explanation:

✓ computer can be used Interactive Learning apps, whereby students can share knowledge

✓Access to Information on the go: computer can be searched when educational information is needed

✓Virtual Classrooms : Incase of online classroom computer can be of help where both teacher student can meet online

✓Data processing and presentation ; computer can be used by both teacher and student in processing of data's.

✓Computer Literacy Education : for Literacy Education, computer can be used in training students to become computer literate.

Other Questions
If point B is at 0, then what are the values of points A and C? What is suggestive selling? Have you experienced an example of this? If so, describe the experience. Why do restaurants use suggestive selling? I WILL GIVE BRAINLEST!!! 20 POINTS!!!If tomatoes cost 5.30 per pound and i have 9.7 pounds how much would i pay? SOMEONE PLEASE HELP ME WITH THIS PLEASE PLEASE PLEASEE ILL GIVE BRAINLY IF YOU GET IT RIGHT!!!!!!! A sports equipment researcher investigated how different types of wood used to make baseball bats might affect batting. The researcher selected a sample of 80 batters from summer baseball leagues and randomly assigned the batters to one of two groups: the ash bat group or the maple bat group. The mean number of hits for each group was recorded at the end of the season, and the difference in the sample means was calculated. Which of the following is the appropriate inference procedure for analyzing the results of the investigation?A. A one-sample t-interval for a population mean B. A one-sample t-interval for a sample mean C. A matched pairs t-interval for a mean difference D. A two-sample t-interval for a difference between sample means E. A two-sample t-interval for a difference between population means What is a possible value of x If -5 Alcohol prohibition in the United Stateshad which unfortunate side effect:Increased profits for breweries.Increased people's respect for all laws.The number of people drinking decreased.Organized crime and increased violence. HELP ASAP ON NUMBER 3 IF U DONT KNOW CAN U PLEASE HELP ME FIND AN EVENT, EXHIBITION, BOOK, OR SOME KIND OF NEWSPAPER FOR THIS QUESTION 7-SS-DCP-20-21-#4Who has the answers find each measure (EH) Dr. Yuan opens a lab. The lab has an initial cost of $100,000. Expected net cash flow is $24,000 in the first year, growing by 15% per year. Net cash flow is revenue less expenses. Assume the lab has a 6 yr life and there is no scrap value for the lab.Later that same year, Dr. Bhat opens a similar lab in the strip mall less than two miles away from Dr. Yuan. Dr. Yuan estimates her net cash flow in the first year will be considerably less than her initial estimate. She estimates it will be $16,000. All else equal, what happens to the NPV of Dr. Yuans lab?a) The NPV decreases, but is still positive. Dr. Yuan can still expect a positive return on her investment.b) The IRR decreases, but is still positive. Dr. Yuan can still expect a positive return on her investment.c) The IRR decreases, and becomes negative. Dr. Yuan should expect a loss on this investment.d) The IRR and the NPV decrease. Dr. Yuan can still expect a positive return on her investment.Assume instead that Dr. Yuan forms a partnership with Dr. Bhat. They agree to share the $100,000 cost equally and to share the cash flow equally. Because of efficiency gains from longer operating hours, they expect the net cash flow to be $32,000 per year. Assume they expect net cash flow to grow at 15% per year. What is the consequence of the partnership to Dr. Yuan? Please compare the results to the original scenario described in question 13 (Dr. Yan opening the only lab in the area).a) The NPV decreases, but is still positive. Dr. Yuan can still expect a positive return on her investment.b) The NPV decreases, and becomes negative. Dr. Yuan should expect a loss on this investment.c) The IRR decreases, but is still positive. Dr. Yuan can still expect a positive return on her investment.d) The IRR and the NPV increase. Dr. Yuan can still expect a positive return on her investment Look at the picture. The flowers of the snow buttercup face one direction in the moring move throughut the day and face the other way by eveing. Most likey this is a reasopns to which stimulus The answer to this question Why does Annie come to the Kellers home? (The miracle worker ) There is two questions please help me Involves negative attitudes or discrimination against someone based on a distinguishing characteristic such as a mental illness, health condition, or disability. Choose the word that best completes each sentence.Plants are . They make their own food.Animals are . They consume other organisms for food. what is computer? different between RAM and ROM? Workout the following divisions.