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
Product Managers are expected to collaborate in planning the amount of upcoming Enabler work by establishing what? a. Accurate u
vaieri [72.5K]

Option D

Product Managers are expected to collaborate in planning the amount of upcoming Enabler work by establishing Completed epic acceptance criteria

<u>Explanation</u>:

Acceptance criteria are a formalized schedule of elements that assure that all user narratives are developed and complete synopses are carried into account. Acceptance Criteria are a collection of observations, respectively with a precise pass/fail outcome, that defines all specifications and are suitable at the Epic, Feature, and Story Level.

An epic is an excellent method to endure the trace of the huge idea in agile circumstances.  It enhances crews split their job while proceeding to operate towards a larger intention.

5 0
4 years ago
The following are exogenous (not directly affected by income): G = 11 I = 4 X = M = 0 The consumption function is: C = k + cY, w
nikitadnepr [17]

Answer: the answer is 90.0

Explanation:

From the question above, we are given:

G = 11

I = 4

X = M = 0

Consumption function is:

C = k + cY

Where:

k = 3

c = 0.8

The GDP of a nation is given as:

Y = C + I + G + NX

By imputing the values into the GDP equation, we have:

Y = k + cY + 4 + 11 + 0

Y = 3 + 0.8Y +15

Y - 0.8Y = 18

0.2Y = 18

Y = 90.0

6 0
3 years ago
Larry comes to your office to file his 2020 tax return and tells you that he never received an Economic Impact Payment (EIP) dur
11111nata11111 [884]

Incomplete question. The options:

a. File his 2020 tax return, including the EIP on Form 1040, line 30, and wait for the IRS to fix the mistake.

b. File Form 14039, Identity Theft Affidavit, with the IRS.

c. Contact the Farm Housing Administration.

d. Contact the bank that received the deposit and ask them to redirect the funds to him.

<u>Answer:</u>

<u>a. File his 2020 tax return, including the EIP on Form 1040, line 30, and wait for the IRS to fix the mistake.</u>

<u>Explanation:</u>

True. According to the information found on the IRS website concerning those who were eligible but didn't receive the Economic Impact Payment (EIP) during 2020, they are to fill the 2020 Form 1040 alongside submitting their tax returns for the year 2020.

Hence, Larry simply needs to file his 2020 tax return, including the EIP on Form 1040, line 30, and wait for the IRS to fix the mistake.

4 0
3 years ago
Oscar makes purchases of an existing product (X) such that the marginal utility of the last unit he consumes is 10 utils and the
sammy [17]

Answer:

INCREASE in Consumption of product Y

DECREASE in Consumption of product X

Explanation:

Based on the information given we were told that the already existing product (X) has a marginal utility of 10 utils as well as the price of the amounts of $5 while the new product (Y) has a marginal utility of 8 utils as well as the price of the amounts of $1 which means that PRODUCT Y marginal utility and price is lower than that of PRODUCT X marginal utility and price.

Therefore equal marginal principle suggests that Oscar should INCREASE his consumption of product Y and DECREASE his consumption of product X reason been that product Y has a lower marginal utility of 8 utils and the price of the amounts of $1 which means that his consumption of Product Y has to be INCREASED while product X on the other has a higher marginal utility 10 utils as well as the price of the amounts of $5 which means that his Consumption of Product X has to DECREASED.

7 0
3 years ago
You have been recently hired as an assistant controller for XYZ Industries, a large, publically held manufacturing company. Your
soldi70 [24.7K]

Answer:

XYZ

a. The Effect on Income Before Taxes of the Change of Ageing Analysis:

The Income before Taxes would be $45,000 ($180,000 - $20,000) -   ($135,000 - 20,000) more than the income that should have been reported.  Assuming the Income Taxes were to be based on the increased income figure, XYZ would have an increased tax liability by say $18,000 (45,000 x 40%).  This reduces the Retained Earnings (or Stockholders Equity) by $18,000.  The company would in actual fact, be reporting a net income of $27,000 more than it should have reported.  This is very deceptive for all those who would be using the reported financial statement in making their decisions.  Unfortunately, we would have showed the affected customer that we are dubious in our business practise, further jeopardizing the chance of full recovery of the debt.  This is apart from taking into consideration the type of customer that would be ready to accept a revised invoice that was formerly past due.

b.  The ethical dilemma is doing the right thing according to Rights Theory.  We cannot say we have adhered to a set of rules (the U.S GAAP or the IFRS) when in fact we are violating an important rule of fair presentation of the elements of the financial statement.

I would try to convince the controller to rescind his suggestion and follow the rules.  We understand that making allowance for uncollectibles is an estimate based on judgement.  However, since we have established the basis and even stated it in the notes to the financial statements, I think that we should follow through.

Explanation:

The year's Uncollectible Expense should be $160,000 ($180,000 - $20,000).  If the allowance for the year were to be adjusted from $180,000 to $135,000, it means that the Uncollectible Expense would then be $115,000 ($135,000 - $20,000).  We will be under-reporting the Uncollectible Expense by a difference of $45,000 ($160,000 - $115,000), thereby boosting the net income before tax by $45,000.

4 0
3 years ago
Other questions:
  • Newton Inc. uses a calendar year for financial reporting. The company is authorized to issue 9,000,000 shares of $10 par common
    11·1 answer
  • Depending on the number of customer footfalls in each section, Glenn, the floor manager of an apparel store, shuffles the number
    8·1 answer
  • How long will it take to pay off a loan of ​$50,000 at an annual rate of 9 percent compounded monthly if you make monthly paymen
    7·1 answer
  • 1. Classify the following manufacturing costs of Business Solutions as (a) variable or fixed and (b) direct or indirect. 2. Prep
    14·1 answer
  • Sarah opened her last month's bank statement, today, to find she had an ending bank balance according to First Bank of Broad Rip
    12·1 answer
  • You are considering a project in Norway with an initial cost of NKr135,000. The project is expected to return a one-time payment
    7·1 answer
  • Tim, a single taxpayer, operates a business as a single-member LLC. In 2018, his LLC reports business income of $394,000 and bus
    14·1 answer
  • suppose you have 100$.Each apple cost $1 and each banana cost $2.draw a picture showing the limitations of what you can buy​
    5·1 answer
  • Name at least 4 of the sources of ethical issues
    12·2 answers
  • Tickets for a concert cost $35 for balcony seats and $75 for floor seats. Tickets at the same venue for a theatrical production
    6·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!