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
(5x + 7)(5x – 7)<br> Foil method
Pavlova-9 [17]

Answer:

25x-49

Step-by-step explanation:

5x×5x=25x 5x×-7= -35x

7×5x=35x 7×-7=-49

(combine like terms)25x+-35x+35x= 25

hope that helped you!

6 0
3 years ago
Plz help I'm and dead confused​
boyakko [2]
<h3>Answer: Choice D</h3>

Domain: {-3, -1, 2, 4, 6}  

Range: {-2, 1, 2, 4, 6}

===========================================

Explanation:

The domain is the set of possible x values of a relation or function. To form the domain, we just list out the x coordinates of each point

Point A is located at (-3, 4) so the x coordinate x = -3 is part of the domain

Point B is at (-1,1) meaning x = -1 is also part of the domain

And so on. Doing this for all five points leads to the list of x coordinates {-3,-1,2,4,6} which is the domain.

--------------------

The range is a similar story, but we look at the y coordinates now. Point A has y coordinate 4, so y = 4 is part of the range.

Point B has y coordinate y = 1, so that is also part of the range.

The range is {-2, 1, 2, 4, 6} representing all of the possible y values of this relation.

With any set, the order does not matter. Though convention is to list the items from smallest to largest.

6 0
3 years ago
Assessments.momaxcom student
Lady_Fox [76]

Answer:

$0.19

Step-by-step explanation:

8 0
3 years ago
Evaluate -(3^-5)(3^3)<br> A. -9<br> B. 9<br> C. 1/9<br> D. -1/9
umka21 [38]

Answer:

D:= -1/9

Step-by-step explanation:

6 0
3 years ago
En una empresa de productos de maquillaje y cuidado de la piel, el equipo de ventas de la sucursal robles, obtuvo como premio al
777dan777 [17]

Answer:

Step-by-step explanation:

4 0
3 years ago
Other questions:
  • Terry has 3 pairs of pants: black, khaki, and brown, and 4 shirts: yellow, red, blue, and white. He does not care which colors h
    8·2 answers
  • Lucy and her mother made tacos they put 2 tacos on each of 7 plates select the number sentences that show all the tacos Lucy and
    8·2 answers
  • What is the meaning of the underlined digit 648? The underlined number is 4 on the question
    15·2 answers
  • Do the sides 9, 12 and 15 make a right triangle?
    5·2 answers
  • Find the area of a parallelogram with a base of 14 m and a height of 5 m.
    7·1 answer
  • How many equations can you write that will equal 100
    12·1 answer
  • If 6 is added to three quarters of a certain number, the result is 42 . Find the original number​
    12·2 answers
  • Initial value question help
    6·1 answer
  • I’m 30 minutes, 40 litres of water runs through a pipe. How much water would run through the pipe in 12 minutes
    13·2 answers
  • (–2) + (–20) step by step
    12·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!