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
Lelechka [254]
3 years ago
15

A. Consider the following algorithm segment: for i := 1 to 4, for j := 1 to i, [Statements in body of inner loop. None contain b

ranching statements that lead outside the loop.] next j, next i. How many times will the inner loop be iterated when the algorithm is implemented and run?
b. Let n be a positive integer, and consider the following algorithm segment: for i := 1 to n, for j := 1 to i, [Statements in body of inner loop. None contain branching statements that lead outside the loop.], next j, next i. How many times will the inner loop be iterated when the algorithm is implemented and run?
Mathematics
1 answer:
yuradex [85]3 years ago
6 0

Answer:

(a) 4i times

(b) "i × n" times

Step-by-step explanation:

(a) Given the algorithm segment;

       for i := 1 to 4,  (Outer loop)

            for j := 1 to i   (Inner loop)

            next j,

       next i

The inner loop runs for i times, while the outer loop runs for 4 times.

The total times the inner loop would run when the entire algorithm is run is:

      = i × 4

      = 4i times

(b) Given the algorithm segment;

     for i := 1 to n,  (Outer loop)

            for j := 1 to i   (Inner loop)

            next j,

      next i

Where n is a set of positive integers.

The inner loop runs for "i" times, while the outer loop runs for "n" times.

The total times the inner loop would run when the entire algorithm is run is:

      = i × n

      = "i × n" times

You might be interested in
Jennifer has 15 plates and 18 napkins that she wants to arrange in baskets. There needs to be the same number
Paraphin [41]

Answer:

i thik itz 3

Step-by-step explanation:

5 0
3 years ago
IDK how to deal with big boy numbers! SOS
qaws [65]

Answer:

SOSOSOSOSOSOSOSOSOSOS

Step-by-step explanation:

WE HAVE A 911 HERE THERE SEEMS TO BE NUMBERS AT HOSTAGE WEE WOO WEE WOO

4 0
3 years ago
Read 2 more answers
If ||M and M6 = 4X - 15 and m7 = x + 30 then m 6 =​
TEA [102]

Answer:

<h2>15</h2>

Step-by-step explanation:

∠6 and ∠7 are Alternate Interior Angles.

The lines l and m are parallel, therefore ∠6 and ∠7 are congruent.

m∠6 = m∠7 → 4x - 15 = x + 30        <em>add 15 to both sides</em>

4x = x + 45          <em>subract x from both sides</em>

3x = 45            <em>divide both sides by 3</em>

x = 15

8 0
4 years ago
Read 2 more answers
If f(x) = 1/3x+13, then f^-1(x) =??​
Sergeeva-Olga [200]

Step-by-step explanation:

Given

f(x) = 1/3x + 13

f^-1(x) = ?

Now

Let y = f(x)

or y = 1/3x + 13

Interchanging the role of x and y

x = 1/3y + 13

x - 13 = 1/3y

y = <u>x </u><u>-</u><u> </u><u>1</u><u>3</u>

3

Therefore f^-1(x) = <u>x </u><u>-</u><u> </u><u>1</u><u>3</u><u> </u>

3

Hope it will help you.

7 0
3 years ago
Someone help!!! it's due in 5 minutes!!!!!
cricket20 [7]

Answer:

B is correct

Step-by-step explanation:

inside the parenthesis you go the opposite way of the sign so |x+7| shifts it to the left 7 units

3 0
3 years ago
Other questions:
  • What is the next letter in the following sequence? M , A, M, J, J, A, S, O, ….
    12·2 answers
  • Please help ASAP! Which ordered pair is a solution of this
    15·2 answers
  • What's 4.50+4.50+2.39+2.39+1.99? What's the answer minus 25?? pls halp meh '-'
    11·1 answer
  • Is the figure congruent to the sample figure? Explain?
    5·1 answer
  • the graph shows the time and distance that a horse ran around a track if the horse runs at that same speed, how long will it tak
    15·1 answer
  • How do you solve equations with rational coefficients?
    13·1 answer
  • For a repeated-measures study comparing two treatments with a sample of n = 9 participants, the difference scores have a mean of
    10·1 answer
  • travis drove 129 miles in 3 hours.he drove at a constant speed.how many miles did he drive in 1 hour?
    5·2 answers
  • Simplify the expression. 4 + 2 • 8<br> a. 48<br> b. 40<br> c. 20<br> d. 18
    5·2 answers
  • Solve the equation for the specified variable. Y=AB-2, For A
    15·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!