answer.
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
Blababa [14]
2 years ago
3

Design a program that asks the user to enter a store's sales for each day of the week. The amounts should be stored in an array.

Use a loop to calculate the total sales for the week and display the result. cpp
Computers and Technology
1 answer:
ahrayia [7]2 years ago
3 0

Answer:

#include <iostream>

using namespace std;

int main()

{

   int  storeSales [7];

   //Receiving user input

   for(int i = 0; i<7; i++){

       cout<<"Enter the sales"<< endl;

       cin>>storeSales[i];

   }

   //calculating and printing the total

   int total = 0;

   for(int i = 0; i<7; i++){

       total = total + storeSales[i];

   }

   cout << "The total is: " <<total<< endl;

   return 0;

}

Explanation:

  • Using C++ programming language
  • Create an array of size seven (Since there are seven days in a week)
  • Use a for loop to add up elements to the arrays when user is prompt
  • use a second for loop to calculate the total of the element added
  • Outside the second for loop, print the total
You might be interested in
An automobile battery, when connected to a car radio, provides 12.5 V to the radio. When connected to a set of headlights, it pr
ladessa [460]
Base on the question, and in my further computation, the possible answers would be the following and I hope you are satisfied with my answer and feel free to ask for more.

- If you want to determine the Thevenin equivalent voltage and resistance without overloading the battery, then apply some known resistance 

<span><span>RL</span><span>RL</span></span> and measure the output voltage as <span><span>VL</span><span>VL</span></span>. Measure the voltage without a load as <span><span>V<span>OC</span></span><span>V<span>OC</span></span></span>. The voltage divider equation tells us that

<span><span><span>VL</span>=<span>V<span>OC</span></span><span><span>RL</span><span><span>R<span>TH</span></span>×<span>RL</span></span></span></span><span><span>VL</span>=<span>V<span>OC</span></span><span><span>RL</span><span><span>R<span>TH</span></span>×<span>RL</span></span></span></span></span>

Solve for <span><span>R<span>TH</span></span><span>R<span>TH</span></span></span>, and you know that <span><span><span>V<span>TH</span></span>=<span>V<span>OC</span></span></span><span><span>V<span>TH</span></span>=<span>V<span>OC</span></span></span></span>.

6 0
2 years ago
A mass m is attached to the end of a rope of length r = 3 meters. The rope can only be whirled around at speeds of 1, 10, 20, or
gayaneshka [121]

Answer:

Explanation:

Let's do this in Python. We know that the formula for the centripetal force caused by whirling the mass is:

F = m\frac{v^2}{r}

where v is the speed (1, 10, 20, 40) and r = 3 m is the rope length.

Then we can use for loop to try calculating the tension force of each speed

def maximum_speed(m):

    for speed in [1, 10, 20, 40]:

         tension_force = m*speed^2/3

         if tension_force > 60:

              return speed

    return speed

7 0
2 years ago
Create a custom list using cells A2 A12.
Dafna1 [17]

Answer:

To create a list of the cells A2 to A12, convert the A2: A12 range to a table, then select the data validation tab, input list as the type and the name of the A2:A12 range table, and then click ok. This list can now be used as a validation list in another column or worksheet.

Explanation:

Microsoft Excel provides the power of tables and list for categorized data and data validation.

7 0
2 years ago
American company Software Unlimited is planning to expand its operations to the Bangor Republic where the group is the primary u
FinnZ [79.3K]

Answer:E. Employees will achieve close cooperation with others.

Explanation: Employees will close cooperation with others as a result of the expansion of the company to the Bangor Republic where the group is the primary unit of social organisation, When a company expands to new locations it boosts employment morale and corporation as they find it as a form of expansion and overall good of the employees and their employer, most of expand as a result of favourable economic climates.

7 0
2 years ago
A smart refrigerator can use _____ to detect when you are running low on milk, and then send a reminder to you on a wireless net
Brilliant_brown [7]

Answer:

IoTs

Explanation:

4 0
2 years ago
Other questions:
  • Compare the encryption algorithms found in s-tools: idea, mdc, des, and 3des.
    5·1 answer
  • Write an application that throws and catches an ArithmeticException when you attempt to take the square root of a negative value
    15·1 answer
  • To reduce costs and the environmental impact of commuting, your company decides to close a number of offices and to provide supp
    11·1 answer
  • In evaluating the precedence rules used by Python, what statement is accurate? a. Addition and subtraction are evaluated after a
    8·2 answers
  • Show how the recursive multiplication algorithm computes XY, where X = 1234 and Y = 4321. Include all recursive computations.
    11·1 answer
  • When should a developer begin thinking about scalability? 1 during the design phase 2during testing 3when traffic increases by 2
    14·1 answer
  • Write a method called printRangeOfNumbers that accepts a minimum, maximum numbers as parameters and prints each number from mini
    6·1 answer
  • Describe the output when the following code executes in 64-bit mode: .data dividend_hi QWORD 00000108h dividend_lo QWORD 3330002
    12·1 answer
  • Sang ayon kaba sa pahayag na walang sinuman ang nabubuhay para sa sarili lamang? bakit?
    15·1 answer
  • Prompt
    5·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!