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
Tom [10]
2 years ago
6

Rearrange the following steps in the correct order to locate the last occurrence of the smallest element in a finite list of int

egers, where the integers in the list are not necessarily distinct.
Rank the options below.
if min > ai then
procedure last smallest a1,a2,....,an: integers)
return location
min = a1 and location = 1
min ai and location = i
for i = 2 to n
Mathematics
1 answer:
Hatshy [7]2 years ago
5 0

Answer:

procedure last smallest a1,a2,....,an: integers)

min = a1 and location = 1

for i = 2 to n

if min > ai then

min ai and location = i

return location

Step-by-step explanation:

The first step is to define the function or procedure last_smallest; This is done by this line

procedure last smallest a1,a2,....,an: integers)

The next step is to initialize two variables to 1; The first variable is the min which represents minimum while the second is location, which represents its location

min = a1 and location = 1

The next is to iterate from the second element to the last

for i = 2 to n

This line checks for the smallest element; if the following conditional statement returns true, then:->

if min > ai then

->It assigns appropriate values to min and location

min ai and location = i

The last step returns the assigned location of the element

return location

You might be interested in
AA3 +2=AAA CC6+6=CBB ABC=?
Ahat [919]
AA3 + 2 = AAA; 

<span><span>3 + 2 = 5; </span><span>- >> A = 5; </span><span>AAA = 555. </span></span>


<span>
CC6 + 6 = CBB; </span>
<span><span>6 + 6 = 12; </span><span>- >> B = 2; </span><span>one goes to the left and C (1 +?) turns into B; </span><span>and B already found = 2; </span></span>

<span><span>C = B-1 = 2-1 = 1; </span><span>- >>> C = 1; </span><span>SVB = 122; </span></span>


<span><span>
ABC =? </span><span>- >> 521.

</span></span>
5 0
2 years ago
Wesley sailed his boat north for 18 miles then due east for another 18 miles approximately how far is Wesley from where he began
True [87]
18 miles north
+18 miles east
=36 miles northeast
5 0
2 years ago
Read 2 more answers
There are 70 students in the school band. 40% of them are sixth-graders, 20% are seventh graders, and the rest are eighth-grader
vichka [17]

Answer:

The answer to your question is 14 students

Step-by-step explanation:

Data

Total students = 70

40% sixth-graders

20% seventh graders

40% eighth graders

The Number of seventh-graders = ?

Process

1.- Use proportions and cross multiplication to solve this problem

                 70 students ----------------------- 100 %

                  x                   ----------------------  20 %

                  x = (20 x 70) / 100

                  x = 1400 / 100

                 x = 14 students are seventh-graders

                  70 students --------------------- 100 %

                  x                   ---------------------   40%

                  x = (40 x 70) / 100

                  x = 2800 / 100

                  x = 28 students are sixth graders

Eighth-graders = 70 - 14 - 28

                         = 28

                 

                 

6 0
2 years ago
Read 2 more answers
4. An airplane is traveling at a speed of 724 km/hr at a direction of 30 degrees. The wind is blowing from the west at 32 km/hr.
tankabanditka [31]

Answer:

28.8 degrees bearing above from the east.

Step-by-step explanation:

Given :

Direction =30 degrees

Speed =724 km/hr

Suppose x1, y1 be the velocity bearing in the east at the 30 degree

so x1 velocity = 724 cos 30 degree

y1 velocity = 724 sin 30  degree

As mention in the question the wind speed adding another 32 to the x1 speed.

Hence the resultant speed  is

velx1= 659\\vely1 = 362

The \ speed\  is\ determined \ by \ following\ formula\ \\ \sqrt{vel y1^2+ velx1^2} \\= \sqrt{659^2+362^2}\\=751.9 km/hr\\therefore\  \ the\  direction is\  arctan \\= vely1/ velx1 \\= arctan( 362/659) \ =28.8\  degrees\ above\ from\  the\  east

8 0
2 years ago
Lawrence has two part-time jobs one at the movie theater and wanted a pet store he's paid by the hour at each job last week he w
alexandr402 [8]
Let x be the earnings/hour at the movie theater.
      y be the earnings/hour at the pet store

Systems of equations:

$152.50 = 10x + 8y
$171 = 8x + 10y

Solving for x and y:
x = $4.36/ hour in the movie theater
y = $13.61/ hour in the pet store.<span />
8 0
2 years ago
Other questions:
  • Heather has a bag with 16 red blocks, 11 blue blocks, 9 purple blocks, 15 green blocks, 8 yellow blocks, and 20 orange blocks. I
    7·1 answer
  • Write a polynomial function of minimum degree with real coefficients whose zeros include those listed. Write the polynomial in s
    11·1 answer
  • Mick paid $2.94 in sales tax on an item that cost $42.00 before tax. At that rate, how much would he paying sales tax before an
    13·1 answer
  • Find the value of x that makes abcd a parallelogram
    10·2 answers
  • Assume the upper arm length of males over 20 years old in the United States is approximately Normal with mean 39.3 centimeters (
    6·1 answer
  • In a bottle-filling process, the amount of drink injected into 16 oz bottles is normally distributed with a mean of 16 oz and a
    10·1 answer
  • Catapult Launch
    7·1 answer
  • Determine the quotient of (22.8 × 10–3) ÷ (5.7 × 10–6). Write your answer in scientific notation.
    10·1 answer
  • Jeanette really loves apple-flavored Fruity Tooty candies, but there always seems to be a lot of cherry-flavored candies in each
    12·2 answers
  • One smartphone plan costs $52 per month for talk and messaging and $8 per gigabyte of data used each month. A second smartphone
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!