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
Mumz [18]
3 years ago
11

Write a for loop that iterates from 1 to numbersamples to double any element's value in datasamples that is less than minvalue.

ex: if minval = 10, then datasamples = [2, 12, 9, 20] becomes [4, 12, 18, 20].
Business
1 answer:
navik [9.2K]3 years ago
5 0

Answer:

for (i = 0; datasamples[i] < NUM_POINTS ; ++i) {

        if(datasamples[i] < minVal) {

        datasamples[i] = datasamples[i] * 2;

     }

 }

Explanation:

In this particular problem, we are trying to look at each value in the datasamples array, and double it. This calls for the use of an index variable.

The index variable will keep track of the position within the array as we move from left to right. Starting on the left, at index 0, we will move right until we are at the end of the array.

++i takes care of incrementing the index variable each time the loop runs. This is what moves through the array.

The termination condition checks whether if we have iterates all values in the array. Once you've gone past all the values in the array the  index variable is pointing all the way at the end.

As soon as the termination condition is false the loop will stop executing. So we will want to run your code while i (the index variable) is less than the size of the array (datasamples.length).

Once you've figured out the for loop bounds, simply check your conditional with an if-then statement before updating the values:

You might be interested in
the first thing you need to do is perform readiness assessments, which can help you understand the level of readiness within you
algol [13]

To know and answer if the first thing you need to do is perform readiness assessments, which can help you understand if the level of readiness within your organization is true or false we need to learn a bit about Why Organizational Readiness Assessments are Important?

Are important because allows you to know if your team or company has the knowledge or resources to afford goals and challenges.

Very similar to an audit, the readiness assessment allows you to know the situation and environment before big changes or new projects.

In a Readiness Assessment the focus is aimed at:

  • Goals and objectives
  • Expectations and concerns
  • If the leader supports the project
  • Resiliency
  • How to minimize potential failure
  • Governance and decision making
  • Other critical needs

Smart leadership in an organization should use all this data to take management measures to sharpen teams and goals.

So we can say that is TRUE.

See more about management at:  brainly.com/question/26106218

#SPJ4

7 0
2 years ago
Newhard Company assigns overhead cost to Jobs on the basis of 125% of direct labor cost. The job cost sheet for Job 313 includes
Ivahew [28]

Answer:

a. Total manufacturing cost $37,000

b. Unit product cost $37

Explanation:

Total Cost = Sum of all manufacturing costs

Total manufacturing cost -

direct materials                                  $10,000

direct labor                                         $12,000

overhead ($12,000×125%)                 $15,000

Total                                                    $37,000

Unit Product Cost = Total Cost / Number of Units

                             =  $37,000/ 1,000 units

                             = $37

8 0
3 years ago
Read 2 more answers
How successful is ABC Company relative to the industry average and leaders in the small specialty retail store industry? Write t
Lerok [7]

Answer: The first ratio, which is the current ratio have them sitting at 5.5 when the average for 2016-2017 was 1.7

Explanation:

From doing three ratios, ABC are doing well above average when it comes to the ratios carried out. The first ratio, which is the current ratio have them sitting at 5.5 when the average for 2016-2017 was 1.7 this doesn't mean they are worth meeting up with their target yet but it would require more loans and them building on what they currently have. This ratio informs them on their stand on taking more loans or not.

With an average of 2.0 in the 2016-2017 year, they are at a 1.2. The lower this ratio is the more debt they can put themselves in and not have to worry about if they could pay it off or not

5 0
3 years ago
A manufacturing company producing medical devices reported $60 million in sales over the last year. At the end of the same year,
Svetradugi [14.3K]

Answer:

Annual average inventory in days (no of times) = 1.5 times

Explanation:

<em>Annual inventory turn over is the average length of time it takes for inventor to be sold and replaced.</em>

<em>Average inventory turnover = average inventory/ cost of sold × 365</em>

<em>Average inventory turnover (in No of  times) = C</em>ost of sold sold /average inventory

Cost of goods sold

= (1000/2000) × 60 million

= $30 million

Closing Inventory = $20 million

Annual average inventory

= $20/ 30 × 365 days

= 243.days

Annual average inventory

= cost of sold sold /average inventory

=30/20

= 1.5 times

Annual average inventory in days =  243.days

Annual average inventory in days (no of times) = 1.5 times

8 0
3 years ago
Eddie was known for driving 30 miles just to save a dollar on the price of his favorite beverage. Eddie perceived price as _____
Inessa [10]

Answer:

Here answer to the first fill in the blank is money paid and answer for the second fill in the blank is overall sacrifice.

Explanation:

Here Eddie has perceived price as money paid for the purchase of his favorite beverage, he is ready to drive 30 miles for this beverage , just because he is saving a dollar on it, so from the Eddie's point view , driving 30 miles to get the beverage is worth it . But as per the most of the customers , Eddie is making an overall sacrifice by driving 30 miles to get the beverage , just because he is saving dollar on it, so from the most customers point of view , driving 30 miles is not worth it and a lot of sacrifice is being made.

7 0
3 years ago
Other questions:
  • Which of the following is a potential operating instrument for the central​ bank? A. The M1 money supply B. The monetary base C.
    11·1 answer
  • The United Kingdom produces computers and sells them to Japan. At the same time Japan produces cars and sells them to the United
    15·1 answer
  • One difference between monopolistic competition and pure competition is that:
    12·1 answer
  • An American fast-food chain that moves into Canada by buying an existing Canadian fast-food chain represents
    10·1 answer
  • Initially, in a borrowing and lending market, or a loanable funds market, there is an equilibrium. Suppose entrepreneurs' aggreg
    12·1 answer
  • Suppose a perfectly competitive firm's total cost of production (TC) is:
    8·1 answer
  • Financial globalization has not resulted​ in: A. an increase in quantity and speed in the flow of capital across the world. B. c
    5·1 answer
  • g Firm X is a monopolist with marginal cost of $5/unit. When maximizing profit, Firm X charges a price of $24/unit. What elastic
    9·1 answer
  • A design firm wants to hire a senior manager to oversee its architecture division. four applicants and their qualifications are
    14·2 answers
  • The regular expression for 4-digit cvc numbers used by american express card holders is?
    9·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!