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
Lerok [7]
4 years ago
5

Given storeMonthlySales NUM STOREST[NUM MONTHST[NUM DEPTS] is a three-dimensional array of floating point values. Write a C++ fu

nction, printMonthlySales, to calculate and print the total value of sales during a specific month by each department and in each store plus totals by store and department and overall sales. The return type of the function is void and the function must have 2 input parameters Sales array and the month the user specified (edit for correct month values!). The constants NUM STORES, NUM_MONTHS, and NUM_DEPTS must be accessed globally by defining the following global variables #define NUM DEPTS 2 #define NUM STORES 2 #define NUM-MONTHS 12 or const int NUM-MONTHS-12; or const in NUM_DEPTS 2; or const int NUM_STORES 2; The array Sales is initialized by the following statement within main() float storeMonthlySales[NUM STOREST[NUM MONTHS1[NUM DEPTS]- 2.1, 2.2, 2.3, 2.4, 2.5, 2.6, 2.7, 2.8, 2.9, 3.0, 3.1,3.2, 3.1, 3.2, 3.3, 3.4, 3.5, 3.6, 3.7, 3.8, 3.9, 4.0, 4.1, 4.2, 2.1, 2.2,2.3, 2.4, 2.5, 2.6, 2.7, 2.8, 2.9, 3.0, 3.1, 3.2 Output: Sales for month of value (where value represents "January", "March", etc.) Dept # value value col value sum Dept # Store Total Store # value row value sum tore # value row value sum Dept Total col value sum total overall sales User enters a new month as many times as they wish and run printMonthlySales against the new month alue Validate user input ("y" or "n") when asking if the user wants to enter a new set of values
Computers and Technology
1 answer:
iogann1982 [59]4 years ago
5 0

Answer:

Y

Explanation:

YEZ

You might be interested in
Mary is searching for the New Years video that she saved on her laptop which file extension should Mary look for
Zepler [3.9K]

documents file on her laptop

8 0
3 years ago
Read 2 more answers
You're in the process of downloading some email messages when your antivirus software displays an alert. you assume the software
Y_Kistochka [10]
Please provide additional information in order to provide an answer to your question.
7 0
3 years ago
Given a list of numbers, find the correct function to find the sum of the squares of only the positive elements.
vovikov84 [41]

Answer:

sqsum4

Explanation:

So to raise a number to a power in python, you can use the ** operation, which is usually confused with the ^, which is an operation, but it is not for raising numbers to a power. It is the xor bit operation, which if you don't know at the moment, it's fine, since it's not necessary for this. each of these lists uses a generation comprehension which is generally defined as: (x for x in object if condition) with the if condition being optional, but in this case it's necessary. If it's a bit confusing, you can define a generator using a function so it's a bit more spread out:

def generator(object):

   for x in object:

       if condition:

           yield x

Although in this instance were going to be performing some operation on x, which in this case is squaring it. So let's just look at the two functions that use the **, since they should be the only options that will be correct.

sqsum1(nums):

   This function does square x, except it uses incorrect syntax. The condition should come after the for loop. Python likely wont tell you this, because it may think you're trying to do something else. You can do one line if statements like this: a if condition else b, which will return a if the condition is true, and b if it isn't. So it may think that you're trying to do this one line if statement, and say that you're missing an else. The function could even implement in this way: <em>x**2 if x > 0 else 0 for x in nums</em>. This way if the x is negative it counts as 0, or in other words isn't counted towards the sum. But without this fix, the function will raise a syntax error

sqsum4(nums):

   This will square each number in x only if the current element "x" is greater than 0, or in other words positive. And then it returns the sum. So this function returns the expected output

5 0
2 years ago
How does an author develop a character in a story
gavmur [86]
An author first comes up with a basic idea, like male or female for example. Then personality traits take place. Character design can be decided before personality traits too, sometimes it helps authors come up with different ideas. Next personal relationships can be included.
4 0
3 years ago
Read 2 more answers
Which design principle is the subject of a photo or image?
MakcuM [25]

Answer:

B) Framing is the answer to your question

8 0
3 years ago
Other questions:
  • You have just changed the system time within your computer's BIOS. You choose to save the settings upon exit. What happens next?
    13·1 answer
  • When an object is instantiated, it receives its own copy of all static variables of the class?
    14·1 answer
  • Convert the Binary Number to a Decimal Number 101
    13·1 answer
  • All resources are limited. Which of the following is NOT a resource?
    11·1 answer
  • Using a windows computer, to make a window wider, you would move the pointer until it changes to the horizontal resize shape and
    6·1 answer
  • Rachel wants to use Microsoft Query to retrieve data from her corporate databases and files so that she doesn't have to retype t
    6·1 answer
  • Regarding the Internet of Things (IoT), a business involved in utilities, critical infrastructure, or environmental services can
    14·1 answer
  • Sistema binario, realizar el pasaje de binario a decimal; 00110011 11101100 11100001 11001100 10010101 11001111 10000001 1000110
    14·1 answer
  • Write a function endpoints that takes a list of numbers (eg. [5, 10, 15, 20, 25]) and returns a new list of only the first and l
    15·1 answer
  • Word frequencies - functions
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!